Create connection to SSL with rejectUnauthorized: true
See original GitHub issueHi, how can I connect to socket.IO with SSL and selfsigned certificate? In JS code I use this:
const socket = io.connect(urlToBridge, {
extraHeaders: {
token: tokenFromUser,
},
rejectUnauthorized : false,
secure: true,
});
In csharp I do not know how to add rejectUnauthorized and secure true.
var client = new SocketIO("https://localhost:443", new SocketIOOptions
{
ExtraHeaders = new Dictionary<string, string>
{
{"type", "server" },
{"token", tokenFromUser
},
});
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
true" a valid option to connect to a mysql server using ssl - ...
Since if ssl = true , then ssl.rejectUnauthorized is undefined , which is falsy but not false . The expression this.ssl.rejectUnauthorized !==
Read more >no way to set rejectUnauthorized from pg-connection-string
Now that rejectUnauthorized is being defaulted to true, there is no way to modify that from the connection string.
Read more >How to Resolve Certificate Errors in a NodeJS App with SSL ...
The easiest solution to resolve these errors is to use the “ rejectUnauthorized ” option as below. ... However, this method is unsafe...
Read more >Locally resolved domains ssl - rejectUnauthorized: true ...
I configured cassandra to ssl and i can connect to it via cqlsh --ssl. If I try to connect via nodejs driver it...
Read more >Connecting TypeORM / node-pg to a postgres database on ...
This behaviour may be disabled by changing rejectUnauthorized: false in the ssl configuration. Using TypeORM createConnection ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @sitihawasabri, for .NET Framework I do not use client.ClientWebSocketProvider. I skipped this part and use System.Net.ServicePointManager.ServerCertificateValidationCallback instead.
Okay noted, thank you so much!