rebours/nginx.conf
ordinarthur 4bb9ed86d4 feat: auto-sync product prices to Stripe from admin + UI fixes
- Admin edit hook syncs prices to Stripe (create/archive)
- "Prochainement disponible" disabled button for products without price
- Seed no longer hardcodes stripePriceId
- Fix nginx port mismatch (3001 → 3000)
- Coord tag background color + sound auto-start fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:30:39 +01:00

64 lines
2.8 KiB
Nginx Configuration File

server {
listen 80;
server_name rebours.studio;
root /var/www/html/rebours/dist;
index index.html;
# ── API proxy → Fastify ──────────────────────────────────────────────────
location /api/ {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
# ── SEO (dynamique depuis DB) ────────────────────────────────────────────
location = /robots.txt {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location = /sitemap.xml {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# ── Admin proxy → Fastify (AdminJS) ──────────────────────────────────────
location ^~ /admin {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
# ── Cache : Astro hashed → immutable ─────────────────────────────────────
location /_astro/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
# ── Cache : CSS/JS sans hash → revalidation ─────────────────────────────
location ~* \.(css|js)$ {
add_header Cache-Control "no-cache";
}
# ── Cache : assets → 7 jours ────────────────────────────────────────────
location ~* \.(jpg|jpeg|png|gif|webp|svg|woff2|woff|ttf|ico)$ {
add_header Cache-Control "public, max-age=604800";
}
# ── HTML : jamais caché ──────────────────────────────────────────────────
location ~* \.html$ {
add_header Cache-Control "no-store";
}
# ── SPA fallback ─────────────────────────────────────────────────────────
location / {
try_files $uri $uri/ $uri.html /index.html;
}
}