Fix maintenance redirects and admin host detection
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user