# HG changeset patch # User drewp@bigasterisk.com # Date 2022-05-22 10:04:18 # Node ID 17b268d2b7f3d38448fd1a0630a3591475d20cc8 # Parent d5f1cc9615af4a08f98abda49303522b339f9498 ws fix diff --git a/bin/homepageConfig b/bin/homepageConfig --- a/bin/homepageConfig +++ b/bin/homepageConfig @@ -27,20 +27,21 @@ def location(path, server, viteServer): # just the tail part for services rewrite ^/{path}/api(/.*) $1 break; proxy_pass {server}; + + # for websocket + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + + proxy_buffering off; + }} location /{path}/ {{ # vite has 'base' to deal with the /{path}/ part of the request proxy_pass {viteServer}; }} -# vite seems to work without this old section-- hopefully other services will too! - # # for websocket - # proxy_http_version 1.1; - # proxy_set_header Upgrade $http_upgrade; - # proxy_set_header Connection "upgrade"; - # proxy_set_header Host $host; - - # proxy_buffering off; """)