mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-11 00:02:13 +00:00
Utilisateurs - Suppression de compte depuis l'écran « Votre compte », confirmée par mot de passe : arbres possédés et médias effacés, email retiré des contributions, sessions fermées partout. - Suppression d'arbre définitive, en base et sur le disque. - Ajout d'un frère ou d'une sœur relié aux parents existants ; relations parent et enfant corrigées en mode démo. - Liste d'attente retirée (route, envoi d'emails, dépendance Resend). Projet ouvert - CI : front, landing, backend avec vérification des migrations, test Docker de bout en bout. - Déploiement lancé seulement après une CI réussie sur main. - Image API : CLI Prisma installée à part pour que les migrations tournent au démarrage. - SECURITY.md, CONTRIBUTING.md, modèles d'issue et de pull request. - Migration renommée avec un nom descriptif, contenu identique. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
142 lines
5.2 KiB
Nginx Configuration File
142 lines
5.2 KiB
Nginx Configuration File
# ─── app.parenthese.io ────────────────────────────────────────────────────────
|
|
|
|
server {
|
|
listen 80;
|
|
server_name app.parenthese.io;
|
|
return 301 https://app.parenthese.io$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name app.parenthese.io;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/app.parenthese.io/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/app.parenthese.io/privkey.pem;
|
|
|
|
# Security headers
|
|
# frame-ancestors allows the landing page (parenthese.io) to embed the app in an iframe
|
|
add_header Content-Security-Policy "frame-ancestors 'self' https://parenthese.io https://www.parenthese.io" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
|
|
|
|
root /var/www/parenthese/frontend/dist;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
rewrite ^/api(/.*)$ $1 break;
|
|
proxy_pass http://127.0.0.1:4000;
|
|
proxy_http_version 1.1;
|
|
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 $scheme;
|
|
client_max_body_size 25m;
|
|
proxy_connect_timeout 10s;
|
|
proxy_send_timeout 30s;
|
|
proxy_read_timeout 30s;
|
|
}
|
|
|
|
location /auth/ {
|
|
proxy_pass http://127.0.0.1:4000;
|
|
proxy_http_version 1.1;
|
|
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 $scheme;
|
|
}
|
|
|
|
location /trees {
|
|
proxy_pass http://127.0.0.1:4000;
|
|
proxy_http_version 1.1;
|
|
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 $scheme;
|
|
client_max_body_size 25m;
|
|
}
|
|
|
|
location /health {
|
|
proxy_pass http://127.0.0.1:4000;
|
|
proxy_http_version 1.1;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
|
add_header Pragma "no-cache" always;
|
|
add_header Content-Security-Policy "frame-ancestors 'self' https://parenthese.io https://www.parenthese.io" always;
|
|
# Keep embedding control in CSP; override any inherited SAMEORIGIN frame header.
|
|
add_header X-Frame-Options "ALLOWALL" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
add_header Content-Security-Policy "frame-ancestors 'self' https://parenthese.io https://www.parenthese.io" always;
|
|
add_header X-Frame-Options "ALLOWALL" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
}
|
|
}
|
|
|
|
|
|
# ─── parenthese.io (landing) ─────────────────────────────────────────────────
|
|
|
|
server {
|
|
listen 80;
|
|
server_name parenthese.io www.parenthese.io;
|
|
return 301 https://parenthese.io$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name www.parenthese.io;
|
|
ssl_certificate /etc/letsencrypt/live/parenthese.io/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/parenthese.io/privkey.pem;
|
|
return 301 https://parenthese.io$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name parenthese.io;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/parenthese.io/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/parenthese.io/privkey.pem;
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
|
|
|
|
root /var/www/parenthese/landing/dist;
|
|
index index.html;
|
|
|
|
# SPA fallback
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
|
add_header Pragma "no-cache" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
}
|
|
|
|
# Fingerprinted static assets
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|