Use supertest for self-sign certificate
See original GitHub issueHi guys,
We have a problem when run test, the result is ‘unable to verify the first certificate’, is there any built-in options on supertest to disable ssl certificate verification? just like rejectUnauthorized
on request.
We found many suggestions use process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
but it doesn’t work on us.
Thank you
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Use supertest for self-sign certificate · Issue #547 - GitHub
Hi guys, We have a problem when run test, the result is 'unable to verify the first certificate', is there any built-in options...
Read more >node.js - NodeJS supertest - testing routes with certificates
On Node.js, TLS and HTTPS will validate certificates before accepting them. Therefore, to use self-signed certificates with Node, ...
Read more >NodeJS HTTPS API testing with mocha and super test - Edureka
I need to use mocha and supertest to test an API that is provided over HTTPS (the certificate are not expired).
Read more >Use supertest for self-sign certificate - Bountysource
Hi guys,. We have a problem when run test, the result is 'unable to verify the first certificate', is there any built-in options...
Read more >Supertest Code Review - ISGroup
'Setting 'NODE_TLS_REJECT_UNAUTHORIZED' to 0 will allow node server to accept self signed certificates and is not an secure behaviour. 10, test/supertest.js.
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
Same here on Node 12 and supertest 4.0.2. trustLocalHost() no longer exists and setting process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 does not work.
Check here: #737