From d2f01bbe03e5018bb1e57730faada93133a2ff0f Mon Sep 17 00:00:00 2001 From: Raine Date: Mon, 1 Jan 2024 19:16:59 +0100 Subject: [PATCH] fix: snipeit reverse proxy --- .../docker-compose.d/custom/nginx/conf.d/snipeit.conf | 9 +++++++++ servers/apoc/docker-compose.d/docker-compose.snipeit.yml | 3 +++ 2 files changed, 12 insertions(+) diff --git a/servers/apoc/docker-compose.d/custom/nginx/conf.d/snipeit.conf b/servers/apoc/docker-compose.d/custom/nginx/conf.d/snipeit.conf index ee9afd9..f1c6d71 100644 --- a/servers/apoc/docker-compose.d/custom/nginx/conf.d/snipeit.conf +++ b/servers/apoc/docker-compose.d/custom/nginx/conf.d/snipeit.conf @@ -7,5 +7,14 @@ server { # default html page location / { 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; } } diff --git a/servers/apoc/docker-compose.d/docker-compose.snipeit.yml b/servers/apoc/docker-compose.d/docker-compose.snipeit.yml index 6d64d95..8b9d87c 100644 --- a/servers/apoc/docker-compose.d/docker-compose.snipeit.yml +++ b/servers/apoc/docker-compose.d/docker-compose.snipeit.yml @@ -17,8 +17,11 @@ services: APP_ENV: "production" APP_DEBUG: "false" PHP_UPLOAD_LIMIT: "100" + APP_TRUSTED_PROXIES: "*" env_file: - /etc/ixvd/secrets/env/snipeit.env + volumes: + - /srv/snipeit/data:/var/lib/snipeit networks: - proxy