This commit is contained in:
ordinarthur 2026-03-13 10:23:05 +01:00
parent 76209f1e5d
commit 5698eba6a8
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ server {
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto https;
} }
# ── SEO (dynamique depuis DB) ──────────────────────────────────────────── # ── SEO (dynamique depuis DB) ────────────────────────────────────────────
@ -28,12 +28,12 @@ server {
} }
# ── Admin proxy Fastify (AdminJS) ────────────────────────────────────── # ── Admin proxy Fastify (AdminJS) ──────────────────────────────────────
location /admin { location ^~ /admin {
proxy_pass http://127.0.0.1:3001; proxy_pass http://127.0.0.1:3001;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto https;
} }
# ── Cache : Astro hashed immutable ───────────────────────────────────── # ── Cache : Astro hashed immutable ─────────────────────────────────────

View File

@ -10,7 +10,7 @@ dotenv.config()
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '') const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '')
const DOMAIN = process.env.DOMAIN ?? 'http://localhost:4321' const DOMAIN = process.env.DOMAIN ?? 'http://localhost:4321'
const app = Fastify({ logger: true }) const app = Fastify({ logger: true, trustProxy: true })
await app.register(cors, { origin: '*', methods: ['GET', 'POST'] }) await app.register(cors, { origin: '*', methods: ['GET', 'POST'] })
// ── Webhook Stripe (AVANT AdminJS pour éviter les conflits de body parsing) ─ // ── Webhook Stripe (AVANT AdminJS pour éviter les conflits de body parsing) ─