Browse Source

Add extra check for Icon proxying

fix-unified-icons-setting
Vince Grassia 2 years ago
parent
commit
7afb32a871
No known key found for this signature in database
GPG Key ID: 9AD7505E8448CC08
  1. 11
      docker-unified/hbs/nginx-config.hbs

11
docker-unified/hbs/nginx-config.hbs

@ -110,19 +110,22 @@ server {
proxy_pass http://localhost:5001/; proxy_pass http://localhost:5001/;
} }
{{/if}} {{/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/ { location /icons/ {
proxy_pass http://localhost:5004/;
}
{{/if}}
{{#if (String.Equal env.BW_ICONS_PROXY_TO_CLOUD "true")}} {{#if (String.Equal env.BW_ICONS_PROXY_TO_CLOUD "true")}}
location /icons/ {
proxy_pass https://icons.bitwarden.net/; proxy_pass https://icons.bitwarden.net/;
proxy_set_header Host icons.bitwarden.net; proxy_set_header Host icons.bitwarden.net;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_ssl_server_name on; proxy_ssl_server_name on;
{{else}}
proxy_pass http://localhost:5004/;
{{/if}}
} }
{{/if}} {{/if}}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_NOTIFICATIONS "true")}} {{#if (String.Equal env.BW_ENABLE_NOTIFICATIONS "true")}}
location /notifications/ { location /notifications/ {

Loading…
Cancel
Save