Polling does not get sent to full URL #4303
Unanswered
hardysabs2
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
node 14.19
I am connecting like this...
const io = require("socket.io-client");
...
theSocket = io.connect("/api", {
query: { token: await getToken() }
});
...
The API server is running soxket.io with ExpressJS and all regular http requests to /api are being served fine.
But socketio polling is being sent to just the domain and gets this error...
https:///socket.io/?token=eyJhbGciOiJSetc&transport=polling&t=Nz9ZCm4 404 (Not Found)
Why is it not going to
https:///api/socket.io/?
The requests are made via Apache.
In a previous supposedly identical environment we were just implementing...
where the API was just on and socket.io worked fine there.
Do you know how I get socketio to connect to the right place?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions