Skip to content

Commit

Permalink
add wss-proxy-params to lnbits to allow websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed Mar 21, 2024
1 parent ba91b19 commit fb4057b
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
2 changes: 2 additions & 0 deletions home.admin/assets/nginx/sites-available/lnbits_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ server {
location / {
proxy_pass http://127.0.0.1:5000;

include /etc/nginx/snippets/wss-proxy-params.conf;

include /etc/nginx/snippets/ssl-proxy-params.conf;
}

Expand Down
2 changes: 2 additions & 0 deletions home.admin/assets/nginx/sites-available/lnbits_tor_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ server {
location / {
proxy_pass https://127.0.0.1:5001;

include /etc/nginx/snippets/wss-proxy-params.conf;

include /etc/nginx/snippets/ssl-proxy-params.conf;
}

Expand Down
2 changes: 1 addition & 1 deletion home.admin/assets/nginx/snippets/gzip-params.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_types *;
gzip_types *;
4 changes: 0 additions & 4 deletions home.admin/assets/nginx/snippets/proxy-params.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ proxy_set_header X-Forwarded-Proto http;
proxy_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;

# remove if not needed
# proxy_set_header X-Forwarded-Host $server_name;

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

ssl_certificate /mnt/hdd/app-data/nginx/tor_tls.cert;
ssl_certificate_key /mnt/hdd/app-data/nginx/tor_tls.key;

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

ssl_certificate /mnt/hdd/app-data/nginx/tls.cert;
ssl_certificate_key /mnt/hdd/app-data/nginx/tls.key;

1 change: 0 additions & 1 deletion home.admin/assets/nginx/snippets/ssl-params.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ add_header Strict-Transport-Security "max-age=31536000";
# run this first (can take 5-10+ minutes on Raspberry Pi 3)
# `sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048`
ssl_dhparam /etc/ssl/certs/dhparam.pem;

4 changes: 0 additions & 4 deletions home.admin/assets/nginx/snippets/ssl-proxy-params.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;

# remove if not needed
# proxy_set_header X-Forwarded-Host $server_name;

5 changes: 5 additions & 0 deletions home.admin/assets/nginx/snippets/wss-proxy-params.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# wss-proxy-params.conf

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

0 comments on commit fb4057b

Please sign in to comment.