mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
fix: always render ZeroProvider, allow anon queries without 401
This commit is contained in:
parent
54ffdc5aad
commit
657f546908
2 changed files with 15 additions and 9 deletions
|
|
@ -12,7 +12,7 @@ async function authenticateRequest(
|
|||
): Promise<{ ctx: Context; error?: never } | { ctx?: never; error: NextResponse }> {
|
||||
const authHeader = request.headers.get("Authorization");
|
||||
if (!authHeader?.startsWith("Bearer ")) {
|
||||
return { error: NextResponse.json({ error: "Unauthorized" }, { status: 401 }) };
|
||||
return { ctx: undefined };
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue