Updated bitwarden to v1.30 it no longer needs to redirect to port 3012 for websockets
This commit is contained in:
1 parent
008ac0d198
commit
ceb19235d5
2 files changed
+25
-14
No files matched your search
@@ -1,30 +1,42 @@
|
|||||||
|
# The `upstream` directives ensure that you have a http/1.1 connection
|
||||||
|
# This enables the keepalive option and better performance
|
||||||
|
#
|
||||||
|
# Define the server IP and ports here.
|
||||||
|
upstream vaultwarden-default {
|
||||||
|
zone vaultwarden-default 64k;
|
||||||
|
server localhost:8080;
|
||||||
|
keepalive 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Needed to support websocket connections
|
||||||
|
# See: https://nginx.org/en/docs/http/websocket.html
|
||||||
|
# Instead of "close" as stated in the above link we send an empty value.
|
||||||
|
# Else all keepalive connections will not work.
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' "";
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name {{ http_host }};
|
server_name {{ http_host }};
|
||||||
|
|
||||||
# Allow large attachments
|
# Allow large attachments
|
||||||
client_max_body_size 128M;
|
client_max_body_size 525M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
|
||||||
proxy_pass http://localhost:8080;
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_pass http://vaultwarden-default;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /notifications/hub {
|
|
||||||
|
|
||||||
proxy_pass http://localhost:3012;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
}
|
|
||||||
|
|
||||||
location /notifications/hub/negotiate {
|
|
||||||
|
|
||||||
proxy_pass http://localhost:8080;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,6 +25,5 @@
|
|||||||
- "postgres:db"
|
- "postgres:db"
|
||||||
published_ports:
|
published_ports:
|
||||||
- 127.0.0.1:8080:80
|
- 127.0.0.1:8080:80
|
||||||
- 127.0.0.1:3012:3012
|
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/lib/{{ host_directory }}/data:/data/"
|
- "/var/lib/{{ host_directory }}/data:/data/"
|
||||||
Reference in new issue
Block a user