1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

check enable flags for different nginx service (#2461)

This commit is contained in:
Kyle Spearrin 2022-12-05 10:13:53 -05:00 committed by GitHub
parent 9ce37e1eb5
commit a6a5a734c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,10 +80,13 @@ server {
location /attachments {
alias /etc/bitwarden/attachments/;
}
{{#if (String.Equal env.BW_ENABLE_API "true")}}
location /api/ {
proxy_pass http://localhost:5001/;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_ICONS "true")}}
location /icons/ {
{{#if (String.Equal env.BW_ICONS_PROXY_TO_CLOUD "true")}}
@ -95,6 +98,8 @@ server {
proxy_pass http://localhost:5004/;
{{/if}}
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_NOTIFICATIONS "true")}}
location /notifications/ {
proxy_pass http://localhost:5006/;
@ -105,10 +110,14 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_EVENTS "true")}}
location /events/ {
proxy_pass http://localhost:5003/;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_SSO "true")}}
location /sso {
proxy_pass http://localhost:5007;
@ -118,6 +127,8 @@ server {
include /etc/nginx/security-headers.conf;
add_header X-Frame-Options SAMEORIGIN;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_IDENTITY "true")}}
location /identity {
proxy_pass http://localhost:5005;
@ -127,6 +138,8 @@ server {
include /etc/nginx/security-headers.conf;
add_header X-Frame-Options SAMEORIGIN;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_ADMIN "true")}}
location /admin {
proxy_pass http://localhost:5000;
@ -136,10 +149,13 @@ server {
include /etc/nginx/security-headers.conf;
add_header X-Frame-Options SAMEORIGIN;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_SCIM "true")}}
location /scim/ {
proxy_pass http://localhost:5002/;
}
{{/if}}
{{#if (String.Equal env.BW_ENABLE_KEY_CONNECTOR "true")}}
location /key-connector/ {