node.js - 在带有nodejs的azure函数应用程序中使用SSL证书

标签 node.js azure certificate azure-function-app

我已将 .pfx 证书上传到我的函数应用。 如何加载此证书以便在我的 Nodejs 代码中使用它? 如果我把它放在项目目录中,我就可以使用它并且它工作正常,但我想避免将它放在项目中。

谢谢。

最佳答案

在Azure门户中,您可以按照下图上传您的私有(private)证书.pfx文件,然后进行SSL绑定(bind)。

图 1. 选择您的 Function App 并移至 Platform features 选项卡,单击 SSL 按钮。

enter image description here

图 2. 然后,选择私有(private)证书 (.pfx) 选项卡并单击上传证书 按钮和旁边的按钮,在右侧对话框窗口中上传您的 .pfx 文件。 enter image description here

图 3. 移至 Bindings 选项卡,然后单击 Add SSL Binding 按钮,在右侧对话框窗口中选择您上传的证书。 enter image description here

那么,可以引用官方文档Configure TLS mutual authentication for Azure App Service要了解如何在 Node.js 代码中配置和启用 SSL 身份验证功能,请参阅其 Node.js sample .

还有其他官方文档也可能有帮助。

  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

关于node.js - 在带有nodejs的azure函数应用程序中使用SSL证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56327847/

相关文章:

apache - 如何使用别名在 Apache 虚拟主机上配置多个 SSL 证书?

node.js - 将 Node.js 与 Gulp、Babel、Webpack 一起使用?

javascript - Node.js 和 MongoDB 代码澄清

azure - 添加对 Azure Blob 存储的 nlog 支持后,Xamarin 版本构建失败

ssl - SetClientCertificate 使用什么主题?

ssl - 如何给Kong添加证书。发出 https 请求

node.js - 无法埋葬工作 beanstalkd

node.js - 资金不能发送到位于我们的账户,因为它在您的平台区域之外

azure - 我如何知道哪些用户正在访问 Azure AD OAuth 2.0 中托管的 API,以便他们只能访问自己的私有(private)数据?

java - Spring boot + Hibernate + SqlAzure 分页问题