beyondcode / expose

A beautiful, fully open-source, tunneling service - written in pure PHP
https://expose.dev
MIT License
4.23k stars 259 forks source link

Constant reloading of page using Expose with a Vite dev server #321

Open unculture opened 2 years ago

unculture commented 2 years ago

I have a Vue 3 / Vite dev server running at http://localhost:8080 with Hot Module Reloading enabled that I would like to share with Expose. I am using a (confirmed working) self-hosted server with Expose 2.2.0 installed. I have configured the Vite dev server Hot Module Replacing feature correctly for use behind an SSL proxy to use port 443 and have confirmed this is working.

Running expose share http://localhost:8080 works and when I visit the HTTPS URL I see my app contents. Very quickly though the page begins to quickly reload over and over again. This is caused, I think, by the websocket connection used for Hot Module Replacement messages closing just after it is established, or by it not being established at all.

ngrok http http://localhost:8080 by contrast works, and I can see the websocket connection has established and is receiving messages.

I suspect that Expose doesn't handle proxying websocket connections. Is this the case?

Emieldv commented 11 months ago

Having the same issue here. Any way to fix this?