在Azure功能应用程序中保守秘密

时间:2016-12-02 19:22:39

标签: azure azure-functions

这篇文章:

https://www.visualstudio.com/en-us/docs/release/examples/azure/change-config-azure-webapps

讨论使用Powershell Set-AzureWebsite命令来更改Web.config文件中的appSettings和connectionStrings值"

这适用于Azure功能吗?

1 个答案:

答案 0 :(得分:3)

是的,它们基于相同的平台,因此它的工作原理相同。例如如果您设置名为{-# LANGUAGE GADTs, DataKinds, TypeFamilies #-} data Door (status :: Status) where OpenDoor :: Door Open ClosedDoor :: Door Closed open :: Door Closed -> Door Open open _ = OpenDoor close :: Door Open -> Door Closed close _ = ClosedDoor toggle :: Door s -> Door (Toggle s) toggle OpenDoor = ClosedDoor toggle ClosedDoor = OpenDoor 的Azure应用程序设置,您将拥有一个名为FOO的环境变量,您可以在功能逻辑中使用该变量。

或者如果使用C#,您也可以写FOO