Page 1 of 1

change websocket address

Posted: Mon Apr 06, 2020 1:54 pm
by hootan
i have two domain name and i need to use one as http/https address and the other as websocket (ws) address,
how can i do that?

Re: change websocket address

Posted: Mon Apr 06, 2020 2:06 pm
by Kent Briggs
The websocket domain/IP has to match the app domain/IP. Why would you want to do that?

Re: change websocket address

Posted: Mon Apr 06, 2020 2:16 pm
by hootan
because i want to run my app on my pc and use tunnel to forward my users to my pc,
my tunnel app is like ngrok

Re: change websocket address

Posted: Mon Apr 06, 2020 2:31 pm
by Kent Briggs
hootan wrote:because i want to run my app on my pc and use tunnel to forward my users to my pc,
my tunnel app is like ngrok
I don't know what ngrok is but I still don't see what you are trying to accomplish.

Re: change websocket address

Posted: Mon Apr 06, 2020 2:36 pm
by hootan
ngrok is tunnel forwarder,
it make a random domain to share between your users,
so you can use your personal pc as server and share your hosting on that random domain.
but for each port it make a random domain, so if my client want to connect to my server as websocket it should connect to my second random domain.

Re: change websocket address

Posted: Mon Apr 06, 2020 2:48 pm
by Kent Briggs
Even if that was possible in Poker Mavens (it is not), I suspect most browsers would reject the websocket attempt because it would violate their same-origin policy.