Fix maintenance redirects and admin host detection

This commit is contained in:
MOH
2026-03-15 04:33:07 +01:00
parent 5d3f77962a
commit 50c3f5cce9
4 changed files with 91 additions and 18 deletions
+6 -2
View File
@@ -1,15 +1,19 @@
import { NextResponse } from "next/server";
import { getSiteSettings } from "@/lib/app-config";
import { getMaintenanceMode, getSiteSettings } from "@/lib/app-config";
export const dynamic = "force-dynamic";
export async function GET() {
const settings = await getSiteSettings();
const [settings, maintenanceEnabled] = await Promise.all([
getSiteSettings(),
getMaintenanceMode(),
]);
return NextResponse.json(
{
defaultLocale: settings.defaultLocale,
maintenanceEnabled,
},
{
headers: {