Use SSL certificate in azure function app with nodejs

别来无恙 提交于 2020-07-09 06:43:28

问题


I uploaded a .pfx certificate to my function app. How do I load this certificate so I can use it in my Nodejs code? If I put it in the project directory I am able to use it and it works fine but I would like to avoid to have it in the project.

Thanks.


回答1:


In Azure portal, you can follow the figures below to upload your private certificate .pfx file and next to do the SSL binding.

Fig 1. Select your Function App and move to Platform features tab to click SSL button.

Fig 2. Then, select Private Certificates (.pfx) tab to click Upload Certificate button and next to upload your .pfxfile in the right dialog window.

Fig 3. Move to Bindings tab and click Add SSL Binding button to select your uploaded cert in the right dialog window.

Then, you can refer to the offical document Configure TLS mutual authentication for Azure App Service to know how to configure and enable SSL authenticatication feature in your Node.js code, see its Node.js sample.

There are other offical documents also may helps.

  1. Use an SSL certificate in your application code in Azure App Service
  2. Tutorial: Bind an existing custom SSL certificate to Azure App Service
  3. Buy and configure an SSL certificate for Azure App Service


来源:https://stackoverflow.com/questions/56327847/use-ssl-certificate-in-azure-function-app-with-nodejs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!