diff --git a/src/pages/api/debug-env.ts b/src/pages/api/debug-env.ts new file mode 100644 index 0000000..1a87ea3 --- /dev/null +++ b/src/pages/api/debug-env.ts @@ -0,0 +1,14 @@ +import type { APIRoute } from 'astro'; + +export const GET: APIRoute = () => { + return new Response(JSON.stringify({ + message: 'Debug der Docker Environment Variablen', + SMTP_HOST_RAW: process.env.SMTP_HOST || 'nicht vorhanden', + SMTP_HOST_LENGTH: process.env.SMTP_HOST ? process.env.SMTP_HOST.length : 0, + SMTP_HOST_IS_EXACT_LOCALHOST: process.env.SMTP_HOST === 'localhost', + HAS_SESSION_SECRET: !!process.env.SESSION_SECRET, + }, null, 2), { + status: 200, + headers: { 'Content-Type': 'application/json' } + }); +};