mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-11 21:49:17 +03:00
16 lines
495 B
TypeScript
16 lines
495 B
TypeScript
import type { APIRoute } from "astro";
|
|
import { getHeaderAuthConfig } from "@/lib/auth-header";
|
|
|
|
export const GET: APIRoute = async () => {
|
|
const config = getHeaderAuthConfig();
|
|
|
|
return new Response(JSON.stringify({
|
|
enabled: config.enabled,
|
|
userHeader: config.userHeader,
|
|
autoProvision: config.autoProvision,
|
|
hasAllowedDomains: config.allowedDomains && config.allowedDomains.length > 0,
|
|
}), {
|
|
status: 200,
|
|
headers: { "Content-Type": "application/json" },
|
|
});
|
|
}; |