Skip to content

Commit 704a4eb

Browse files
committedJan 2, 2025
fix(无法使用siteconfig改为使用Blog对象):
1 parent 8a2ec28 commit 704a4eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎middleware.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
22
import { NextRequest, NextResponse } from 'next/server'
33
import { checkStrIsNotionId, getLastPartOfUrl } from '@/lib/utils'
44
import { idToUuid } from 'notion-utils'
5-
import { siteConfig } from '@/lib/config'
5+
import BLOG from './blog.config'
66

77
/**
88
* Clerk 身份验证中间件
@@ -35,7 +35,7 @@ const isTenantAdminRoute = createRouteMatcher([
3535
// eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
3636
const noAuthMiddleware = async (req: NextRequest, ev: any) => {
3737
// 如果没有配置 Clerk 相关环境变量,返回一个默认响应或者继续处理请求
38-
if (siteConfig('UUID_REDIRECT')) {
38+
if (BLOG['UUID_REDIRECT']) {
3939
let redirectJson: Record<string, string> = {}
4040
try {
4141
const response = await fetch(`${req.nextUrl.origin}/redirect.json`)

0 commit comments

Comments
 (0)
Please sign in to comment.