41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
charset utf-8;
|
|
autoindex off;
|
|
disable_symlinks on;
|
|
server_tokens off;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
gzip on;
|
|
gzip_types text/css application/javascript application/json image/svg+xml;
|
|
|
|
location = /healthz {
|
|
access_log off;
|
|
default_type text/plain;
|
|
return 200 "ok\n";
|
|
}
|
|
location = /manga/library.json {
|
|
proxy_pass http://library:8000/library.json;
|
|
proxy_connect_timeout 3s;
|
|
proxy_read_timeout 10s;
|
|
proxy_hide_header Cache-Control;
|
|
add_header Cache-Control "no-store";
|
|
}
|
|
location ~ /\. { deny all; }
|
|
location ~ ^/(manga|images)/ {
|
|
add_header Cache-Control "no-cache";
|
|
try_files $uri =404;
|
|
}
|
|
location ~* \.(html|css|js|json)$ {
|
|
add_header Cache-Control "no-cache";
|
|
try_files $uri =404;
|
|
}
|
|
location ~* \.(webp|png|jpe?g|avif|svg|ttf|woff2?)$ {
|
|
expires 7d;
|
|
try_files $uri =404;
|
|
}
|
|
location / { try_files $uri $uri/ =404; }
|
|
} |