fix: snipeit reverse proxy

This commit is contained in:
Strix 2024-01-01 19:16:59 +01:00
parent b251cc9894
commit d2f01bbe03
No known key found for this signature in database
GPG key ID: 5F35B3B8537287A7
2 changed files with 12 additions and 0 deletions

View file

@ -7,5 +7,14 @@ server {
# default html page # default html page
location / { location / {
proxy_pass http://snipeit; proxy_pass http://snipeit;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
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 https;
} }
} }

View file

@ -17,8 +17,11 @@ services:
APP_ENV: "production" APP_ENV: "production"
APP_DEBUG: "false" APP_DEBUG: "false"
PHP_UPLOAD_LIMIT: "100" PHP_UPLOAD_LIMIT: "100"
APP_TRUSTED_PROXIES: "*"
env_file: env_file:
- /etc/ixvd/secrets/env/snipeit.env - /etc/ixvd/secrets/env/snipeit.env
volumes:
- /srv/snipeit/data:/var/lib/snipeit
networks: networks:
- proxy - proxy