Files
online-backend/nginx/file.conf

20 lines
654 B
Plaintext

# Public file download (MinIO objects).
# Copy into the HTTPS server block, or:
# sudo cp nginx/file.conf /etc/nginx/snippets/online-back-file.conf
# include /etc/nginx/snippets/online-back-file.conf;
#
# URL: https://<host>/file/<file_name>
# App: GET http://127.0.0.1:5005/file/<file_name>
location /file/ {
proxy_pass http://127.0.0.1:5005/file/;
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;
expires 7d;
add_header Cache-Control "public, max-age=604800";
}