-
Notifications
You must be signed in to change notification settings - Fork 181
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Solution for https and reverse proxy - WORKS #319
Comments
@markosole Hello. How can I edit rules for Nginx? I can connect my remote server socket via javascript client but not via Flutter. |
@sametserpil is your server Apache or Nginx and do you have access to config? - I am not Apache (and even less Nginx) expert but I'll try to help. |
Yeah server is mine and I've setup Nginx for reverse proxy. It's also not working with ip:port combination. Here are my logs: My NodeJS socket.io version -> "socket.io": "^4.6.1", opening https://my-host-url-here |
Can you paste your:
It's missconfiguration or missmatch of versions. |
Found the solution. It works with following nginx configuration and manual connection. @markosole thanks for the help.
|
@sametserpil |
Connection Error: WebSocketException: Connection to 'https://example.com:0/socket.io/?EIO=4&transport=polling#' was not upgraded to websocket I am facing same issue. I have used socket_io_client: ^2.0.3+1 and from backend i have used 4.7.3 version of node and i have also set code necessary for server. but still can't connect |
@Jimesh843 |
then i need to use transport as websocket instaed of pooling? socket = IO.io( is it relevant? Output: Still I am getting this error should i need to give any thing on server side or any permission from my side |
Please help to solve this issue |
Hi all,
After 3 days of searching and digging around, I've finally made compatible (mixture) setup between NodeJS Server + Client + Flutter client that work over HTTPS. Many of you had or still have same problem and here is short and sweet how to set it up with Apache reverse proxy forwarding
Server
Short and simple
NodeJS Client
Works with https with transports set to
polling
and without specified port number.Sidenote: NodeJS client does not work with
websocket
transports. It has to be set to "polling" mode or not set at all (default is polling)Flutter Client
Works with http and on specified port:
Works with HTTPS:
Apache config - common setups
This does not work for Flutter client on https. Use another one below.
Apache config - Flutter compatible
Keep in mind to add
ws://
insteadhttp://
as on example aboveVersions used
NodeJS socket.io server: 4.6.0
NodeJS socket.io-client: 4.6.0
Flutter socket_io_client package: 2.0.1
Drop a comment if you have questions and suggestions. Cheers
The text was updated successfully, but these errors were encountered: