Support sub-path deploy via NEXT_PUBLIC_BASE_PATH (loma.chat/pagiva)
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies, OAuth redirects, manifest, service worker and cron runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { appUrl } from "@/lib/base-path";
|
||||
import { NextResponse } from "next/server";
|
||||
import {
|
||||
authorizeUrl,
|
||||
@@ -19,7 +20,7 @@ export async function GET(req: Request, ctx: RouteContext<"/api/auth/oauth/[prov
|
||||
const url = new URL(req.url);
|
||||
const provider = parseProvider(raw);
|
||||
if (!provider || !enabledProviders().includes(provider)) {
|
||||
return NextResponse.redirect(new URL("/login?error=not_configured", url.origin));
|
||||
return NextResponse.redirect(`${appUrl(url.origin)}/login?error=not_configured`);
|
||||
}
|
||||
|
||||
const { nonce, cookie } = await createSocialState(provider, {
|
||||
|
||||
Reference in New Issue
Block a user