diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f87f22848..8f40a9b27 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,6 +10,11 @@ services: - mssql.override.env ports: - '1433:1433' + + web: + image: bitwarden/web + container_name: web + restart: always api: image: bitwarden/api diff --git a/util/Setup/Program.cs b/util/Setup/Program.cs index 1ad275ebd..b7eb33231 100644 --- a/util/Setup/Program.cs +++ b/util/Setup/Program.cs @@ -124,6 +124,16 @@ server {{ } sw.WriteLine($@" + location / {{ + proxy_pass http://web/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Url-Scheme $scheme; + proxy_redirect off; + }} + location /api/ {{ proxy_pass http://api/; proxy_set_header X-Real-IP $remote_addr;