mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
fix(无法使用siteconfig改为使用Blog对象):
This commit is contained in:
@@ -2,7 +2,7 @@ import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { checkStrIsNotionId, getLastPartOfUrl } from '@/lib/utils'
|
||||
import { idToUuid } from 'notion-utils'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import BLOG from './blog.config'
|
||||
|
||||
/**
|
||||
* Clerk 身份验证中间件
|
||||
@@ -35,7 +35,7 @@ const isTenantAdminRoute = createRouteMatcher([
|
||||
// eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
||||
const noAuthMiddleware = async (req: NextRequest, ev: any) => {
|
||||
// 如果没有配置 Clerk 相关环境变量,返回一个默认响应或者继续处理请求
|
||||
if (siteConfig('UUID_REDIRECT')) {
|
||||
if (BLOG['UUID_REDIRECT']) {
|
||||
let redirectJson: Record<string, string> = {}
|
||||
try {
|
||||
const response = await fetch(`${req.nextUrl.origin}/redirect.json`)
|
||||
|
||||
Reference in New Issue
Block a user