This repository has been archived on 2026-04-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
routeros_backup_next/frontend/nginx/default.conf
Mateusz Gruszczyński ff7dbcb4e4 first commit
2026-04-12 21:26:12 +02:00

79 lines
2.2 KiB
Plaintext

upstream backend_upstream {
server backend:8000;
keepalive 16;
}
server {
listen 80;
server_name _;
server_tokens off;
etag off;
root /usr/share/nginx/html;
index index.html;
#gzip on;
#gzip_comp_level 5;
#gzip_min_length 1024;
#gzip_types text/plain text/css text/javascript application/javascript application/json application/xml image/svg+xml;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
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;
proxy_set_header Connection "";
proxy_buffering off;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
location ^~ /assets/ {
expires 7d;
add_header Cache-Control "public, max-age=604800, immutable" always;
try_files $uri =404;
}
location = /favicon.ico {
expires 7d;
add_header Cache-Control "public, max-age=604800" always;
try_files $uri =404;
}
location = /index.html {
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
try_files $uri =404;
}
location ^~ /api/ {
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
add_header Pragma "no-cache" always;
proxy_pass http://backend_upstream/api/;
}
location = /docs {
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://backend_upstream/docs;
}
location = /openapi.json {
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://backend_upstream/openapi.json;
}
location = /redoc {
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://backend_upstream/redoc;
}
location / {
try_files $uri $uri/ /index.html;
}
}