Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/api/v1/search/stream/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ export async function POST(request: NextRequest) {
const authHeader = request.headers.get('authorization')
// cookie token → "Bearer <token>"; otherwise forward Authorization header as-is (e.g. "MR-xxx")
const authorization = cookieToken ? `Bearer ${cookieToken}` : authHeader || undefined
console.log("============================00003",process.env.USE_MOCK_SEARCH);

const stream = config.USE_MOCK_SEARCH
? mockSearchStream(query, page, pageSize)
: wispaperSearchStream(query, page, pageSize, authorization)
Expand Down
4 changes: 4 additions & 0 deletions lib/server/nacos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export async function fetchNacosConfig(): Promise<void> {

const content = await res.text()
const entries = parseEnvContent(content)
console.log("============================00001",process.env.USE_MOCK_SEARCH);

// Inject into process.env, overwriting existing values
let injected = 0
Expand All @@ -106,6 +107,9 @@ export async function fetchNacosConfig(): Promise<void> {
injected++
}

console.log("============================00002",process.env.USE_MOCK_SEARCH);


console.log(
`[nacos] Loaded config from ${dataId}@${group} (namespace=${namespace}): ` +
`${Object.keys(entries).length} keys found, ${injected} injected`,
Expand Down