-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override websocket location #236
Comments
Unfortunately, you can't customize it. It should be supported. |
Similarly, I develop on a remote machine so localhost doesn't work for me. If anyone else has that challenge, for now, I was successfully able to use Fiddler HOSTS feature to remap localhost -> remote IP. I'm sure there's a similar debugging proxy for OS X / Linux (Charles?) that could do the same. (Edit: in case anyone else was going to try, I found out Chrome WebRequest handlers don't fire for websockets so a browser extension is out) |
This is a show stopper for me. |
FWIW, as a temporary workaround I am running the following command to modify the hard coded websocket to my own domain. In the below example I'm changing it to the SSL secured "example.com": grep -r http://localhost:3030 .next node_modules/next|awk -F ':' {'print $1'}|sort -u|xargs perl -pi -e 's,http://localhost:3030,https://www.example.com,g' |
I have an nginx server. It has a https vhost. We'll pretend it is https://www.example.com for now. I have told it to proxy to a next.js application running at localhost:3000. The trouble is, my browser is trying to open a websocket to "https://localhost:3030". I don't see a way of overriding where the websocket connection should go to... Ideally, I'd just tell it to go to https://www.example.com and then configure nginx to forward requests for /sockjs-node/ to localhost:3030.
So, is there a way of overriding the websocket location? If not, can I add this as a feature request please.
The text was updated successfully, but these errors were encountered: