Skip to content

Location MisMatch on Secure WebSockets #70

Closed
@amark

Description

@amark

When the client has
new io.Socket(null, {secure: true});
And the server has
credentials = crypto.createCredentials({...});
server = http.createServer(function(req,res){...});
server.setSecure(credentials);
server.listen(8080);
io.listen(server).on('connection', function(client){...});

Browse https://localhost:8080/
Using XHR-Multipart there is a secure connection, no problem.
Using WebSockets there is a Error during WebSocket handshake: location mismatch: wss://localhost:8080/socket.io/websocket != ws://localhost:8080/socket.io/websocket.
And nothing works.

If I change the client to "secure: false" then no error is reported, but nothing works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions