fix:docker

This commit is contained in:
2025-09-27 13:24:36 +02:00
parent 752cb045cd
commit dd20a12246
8 changed files with 35 additions and 39 deletions

View File

@@ -9,8 +9,13 @@ export const handle: Handle = async ({ event, resolve }) => {
// Skip CSRF check for GET/HEAD requests
if (method !== 'GET' && method !== 'HEAD') {
// For development, allow requests without origin header or from localhost
if (!origin || origin.includes('localhost') || origin.includes('127.0.0.1')) {
// Allow in development
if (
!origin ||
origin.includes('localhost') ||
origin.includes('127.0.0.1') ||
origin.includes('demo.ziasvannes.tech')
) {
// Allow in development and demo
}
// In production, you would add: else if (origin !== 'yourdomain.com') { return new Response('Forbidden', { status: 403 }); }
}