Proxy vite HMR websocket in dev

This commit is contained in:
Andrew Kingston 2022-08-16 09:25:16 +00:00
parent 34798ad61d
commit 1ef1cc84ad
1 changed files with 5 additions and 0 deletions

View File

@ -77,6 +77,11 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} }
location /ws {
proxy_pass http://{{ address }}:3000;
rewrite ^/ws(.*)$ /$1 break;
}
location / { location / {
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;