Skip to content
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

Setting rejectUnauthorized to false is not ignoring certificate error #954

Closed
aravindsrivats opened this issue Mar 29, 2016 · 5 comments
Closed

Comments

@aravindsrivats
Copy link

I've a self signed certificate setup with a different hostname on my server. I get a
WebSocket Error: Network Error 12038, The host name in the certificate is invalid or does not match
on IE.

I tried setting rejectUnauthorized to false but it still gives me the same error.

var wsconnect = socket('https://url', {
  transports: ['websocket'],
  rejectUnauthorized: false
});

Am I doing this right?

@zeeshanjan82
Copy link

@aravindsrivats using process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

@roccomuso
Copy link

does it works?

@YenF
Copy link

YenF commented Mar 30, 2018

does this only work on nodejs but not with the client on browser? I can't get it work from browser. Still pop out Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID in chrome

@mspettel13
Copy link

Did anyone ever figure this out? Having this problem now.

@darrachequesne
Copy link
Member

rejectUnauthorized is indeed a Node.js-only option, I've updated the documentation to make it clearer: https://socket.io/docs/v3/client-initialization/#Node-js-specific-options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants