Update to use latest upstream Nginx config
https://github.com/inventree/InvenTree/blob/master/docker/production/nginx.prod.conf
This commit is contained in:
parent
49c294705f
commit
b4167cd30f
24
nginx.conf
24
nginx.conf
@ -4,24 +4,29 @@ server {
|
||||
# Listen for connection on (internal) port 80
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
# Change 'inventree-server' to the name of the inventree server container,
|
||||
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
||||
proxy_pass http://inventree-server:8000;
|
||||
real_ip_header proxy_protocol;
|
||||
|
||||
location / {
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-By $server_addr:$server_port;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header CLIENT_IP $remote_addr;
|
||||
|
||||
proxy_pass_request_headers on;
|
||||
|
||||
proxy_redirect off;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
# Change 'inventree-server' to the name of the inventree server container,
|
||||
# and '8000' to the INVENTREE_WEB_PORT (if not default)
|
||||
proxy_pass http://inventree-server:8000;
|
||||
}
|
||||
|
||||
# Redirect any requests for static files
|
||||
@ -41,6 +46,9 @@ server {
|
||||
|
||||
# Media files require user authentication
|
||||
auth_request /auth;
|
||||
|
||||
# Content header to force download
|
||||
add_header Content-disposition "attachment";
|
||||
}
|
||||
|
||||
# Use the 'user' API endpoint for auth
|
||||
|
Loading…
Reference in New Issue
Block a user