Add developer API, Prometheus metrics, and community links
This commit is contained in:
6
proxy.ts
6
proxy.ts
@@ -11,6 +11,12 @@ export async function proxy(request: NextRequest) {
|
||||
return NextResponse.redirect(destination);
|
||||
}
|
||||
let response = NextResponse.next({ request });
|
||||
// Developer requests authenticate with their own opaque key, never browser cookies.
|
||||
if (
|
||||
request.nextUrl.pathname.startsWith("/api/dev/v1/") ||
|
||||
request.nextUrl.pathname === "/api/dev/openapi.json"
|
||||
)
|
||||
return response;
|
||||
if (!process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY) return response;
|
||||
const client = createServerClient(
|
||||
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
||||
|
||||
Reference in New Issue
Block a user