Skip to content

Commit

Permalink
fix(无法使用siteconfig改为使用Blog对象):
Browse files Browse the repository at this point in the history
  • Loading branch information
qixing-jk committed Jan 2, 2025
1 parent 8a2ec28 commit 704a4eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 身份验证中间件
Expand Down Expand Up @@ -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`)
Expand Down

0 comments on commit 704a4eb

Please sign in to comment.