ASP.NET Core中正确设置环境变量
一般设置都是放在appsettings.json,为了安全,特地把一些敏感信息如密码移到环境变量中去,那么如何设置带有子元素的变量呢比如ConnectStrings:
Windows下用冒号“:”分级比如:
1 | ASPNETCORE_ConnectionStrings:BlogDb=conn_str |
Linux/Mac下用双下划线“__”分级比如:
1 | ASPNETCORE_ConnectionStrings__BlogDb=conn_str |
ASP.NET Core中正确设置环境变量
https://jinzhao.me/2021/11/05/2021/2021-11-05-asp-net-core中正确设置环境变量/
You need to set
install_url to use ShareThis. Please set it in _config.yml.