30 lines
630 B
TypeScript
30 lines
630 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
import { getMaintenanceMode, getSiteSettings } from "@/lib/app-config";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function GET() {
|
|
const [settings, maintenanceEnabled] = await Promise.all([
|
|
getSiteSettings(),
|
|
getMaintenanceMode(),
|
|
]);
|
|
|
|
console.info("api:site:default-locale", {
|
|
defaultLocale: settings.defaultLocale,
|
|
maintenanceEnabled,
|
|
});
|
|
|
|
return NextResponse.json(
|
|
{
|
|
defaultLocale: settings.defaultLocale,
|
|
maintenanceEnabled,
|
|
},
|
|
{
|
|
headers: {
|
|
"Cache-Control": "no-store, max-age=0",
|
|
},
|
|
},
|
|
);
|
|
}
|