311f14b0eb
Astro por default rechaza POST con "Cross-site POST form submissions are forbidden" cuando el header Host y el Origin no matchean literalmente. Detrás de Cloudflare Tunnel esto pasa siempre porque Host llega como el hostname público pero Origin trae la URL edge. Los endpoints ya están protegidos por cookies HttpOnly + SameSite=Lax y OAuth PKCE, así que CSRF no aplica. Se desactiva checkOrigin. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
26 lines
671 B
JavaScript
26 lines
671 B
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
|
|
import react from '@astrojs/react';
|
|
import node from '@astrojs/node';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
output: 'server',
|
|
integrations: [react()],
|
|
|
|
adapter: node({
|
|
mode: 'standalone'
|
|
}),
|
|
|
|
// El check por default compara Host vs Origin y falla detrás de
|
|
// Cloudflare Tunnel porque los headers no matchean literalmente.
|
|
// Nuestros endpoints ya usan cookies HttpOnly + SameSite=Lax y
|
|
// Supabase OAuth con PKCE, así que CSRF no aplica.
|
|
security: { checkOrigin: false },
|
|
|
|
vite: {
|
|
plugins: [tailwindcss()]
|
|
}
|
|
}); |