netty-socketio-demo
netty-socketio-demo copied to clipboard
socketio-demo Not remotely access
var chat1Socket = io.connect('http://localhost:9092/chat1'); //yes var chat1Socket = io.connect('http://192.168.1.105:9092/chat1'); //error How to solve this CORS problem?
via Configuration.setOrigin("*")
Dear mrniko, first of all, thank you for your amazing works.
I am trying to access the server remotely, but im clueless about how to code the server. I have the following:
_config.setOrigin(" * ");_
_config.setHostname("ip address");_
_config.setPort(3333);_
for client, i have var chat1Socket = io.connect('http://ip address: 3333);
but it doesnt work, i just want to know where to set the domain and hostname. The question may be stupid but I am kinda new to the server thing. Thank you in advance.
Hi! setOrigin(" * ")
- remove spaces.
i leave the space to make it obvious for you to see. So in my project I do not leave any spaces. Sorry for the confusion