Files
ReadaBook/apps/web/nginx/default.conf
Git Agent 39dd130c47 fix(web): admin des bibliothèques — UX, gestion d'erreur, styles
- web: AdminPage (admin bibliothèques), client API, styles
- web: nginx

Refs: #15
2026-08-23 11:28:07 +02:00

59 lines
1.3 KiB
Plaintext

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /sw.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
try_files /sw.js =404;
}
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
try_files /index.html =404;
}
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
}
location ^~ /auth {
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location ^~ /admin {
if ($http_accept ~* "text/html") {
rewrite ^ /index.html last;
}
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location ^~ /books {
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location ^~ /progress {
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /healthz {
proxy_pass http://api:3000/healthz;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
try_files $uri $uri/ /index.html;
}
}