39 lines
1.1 KiB
Nginx Configuration File
39 lines
1.1 KiB
Nginx Configuration File
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
|
|
root /var/www/umbyte;
|
|
index index.html;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript
|
|
text/xml application/xml text/javascript image/svg+xml;
|
|
gzip_min_length 1024;
|
|
gzip_comp_level 5;
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:3000;
|
|
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_read_timeout 60s;
|
|
}
|
|
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
}
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
}
|