42 lines
1003 B
Plaintext
42 lines
1003 B
Plaintext
server {
|
|
listen 80 default_server;
|
|
server_name ${SERVER_NAME};
|
|
server_tokens off;
|
|
etag off;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml;
|
|
gzip_min_length 1024;
|
|
|
|
client_max_body_size 100M;
|
|
|
|
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 X-Forwarded-Host $host;
|
|
|
|
proxy_connect_timeout 10s;
|
|
proxy_send_timeout 30s;
|
|
proxy_read_timeout 60s;
|
|
|
|
location /api/ {
|
|
proxy_pass http://api:4000/api/;
|
|
add_header Cache-Control "no-store, no-cache" always;
|
|
}
|
|
|
|
location /uploads/ {
|
|
alias /srv/uploads/;
|
|
access_log off;
|
|
expires 30d;
|
|
add_header Cache-Control "public, max-age=86400, immutable" always;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://web:80/;
|
|
add_header Cache-Control "no-store, no-cache" always;
|
|
}
|
|
}
|