How do I use a self signed certificate for a HTTPS Node.js server?

前端 未结 5 1119
别那么骄傲
别那么骄傲 2020-11-28 19:16

I have started writing a wrapper for an API which requires all requests to be over HTTPS. Instead of making requests to the actual API while I am developing and testing it I

5条回答
  •  执念已碎
    2020-11-28 19:40

    Your key generation looks okay. You shouldn't need a ca because you aren't rejecting unsigned requests.

    Add .toString() to the end of your readFileSync methods so that you are actually passing a string, not a file object.

提交回复
热议问题