From 7afb32a8715bedb0cdc6fbf554909a9403be814f Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Tue, 1 Aug 2023 10:50:28 -0400 Subject: [PATCH] Add extra check for Icon proxying --- docker-unified/hbs/nginx-config.hbs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docker-unified/hbs/nginx-config.hbs b/docker-unified/hbs/nginx-config.hbs index 5b57673..a2b9b07 100644 --- a/docker-unified/hbs/nginx-config.hbs +++ b/docker-unified/hbs/nginx-config.hbs @@ -110,19 +110,22 @@ server { proxy_pass http://localhost:5001/; } {{/if}} -{{#if (String.Equal env.BW_ENABLE_ICONS "true")}} +{{#if (String.Equal env.BW_ENABLE_ICONS "true") && !(String.Equal env.BW_ICONS_PROXY_TO_CLOUD "true")}} location /icons/ { + proxy_pass http://localhost:5004/; + } +{{/if}} {{#if (String.Equal env.BW_ICONS_PROXY_TO_CLOUD "true")}} + location /icons/ { proxy_pass https://icons.bitwarden.net/; proxy_set_header Host icons.bitwarden.net; proxy_set_header X-Forwarded-For $remote_addr; proxy_ssl_server_name on; -{{else}} - proxy_pass http://localhost:5004/; -{{/if}} } {{/if}} + +{{/if}} {{#if (String.Equal env.BW_ENABLE_NOTIFICATIONS "true")}} location /notifications/ {