From 1ef1cc84ada33fcf9c62d32f19f8f465b6b7720a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 09:25:16 +0000 Subject: [PATCH] Proxy vite HMR websocket in dev --- hosting/nginx.dev.conf.hbs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 9398b7e719..91f495cfac 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -77,6 +77,11 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } + location /ws { + proxy_pass http://{{ address }}:3000; + rewrite ^/ws(.*)$ /$1 break; + } + location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;