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:
@@ -3,7 +3,8 @@
|
||||
import "dotenv/config";
|
||||
|
||||
const PORT = process.env.PORT || 3000;
|
||||
const BASE = `http://127.0.0.1:${PORT}`;
|
||||
const BASE_PATH = (process.env.NEXT_PUBLIC_BASE_PATH ?? "").replace(/\/+$/, "");
|
||||
const BASE = `http://127.0.0.1:${PORT}${BASE_PATH}`;
|
||||
const SECRET = process.env.CRON_SECRET;
|
||||
|
||||
if (!SECRET) {
|
||||
|
||||
Reference in New Issue
Block a user