How to connect Socket.IO client using HTTPS frontend to Socket.IO server running on HTTP ? #5042
-
Describe the bug To Reproduce Here is my server config: Socket.IO server version: x4.7.5 Server import http from "http" const app = express() io.on("connection", (socket) => { socket.on("disconnect", () => { server.listen(3000) // using nginx I am proxing to this port. Client import { io } from "socket.io-client"; const socket = io("https://myserverip/", {}); socket.on("connect", () => { socket.on("disconnect", () => { Platform: Device: Any Browser |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! Unfortunately, I don't think this is possible, as the browser won't allow a HTTPS page call a resource over plain HTTP. See also: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content |
Beta Was this translation helpful? Give feedback.
Hi! Unfortunately, I don't think this is possible, as the browser won't allow a HTTPS page call a resource over plain HTTP.
See also: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content