【发布时间】:2021-09-09 03:02:19
【问题描述】:
我正在尝试使用 ARM 模板在 Azure Front Door 后面自动设置我的应用服务。我已经能够设置 ipSecurityRestrictions 对象以将其限制为任何 Front Door (see this stack overflow)- 但我还想设置 X-Azure-FDID 标头,以便我只能限制为我的 Azure Front Door。
我已使用以下 ipSecurityRestrictions 对象设置了我的 siteConfig,但未设置 X-Azure-FDID 标头。我尝试将标题设置为属性和列表。
"ipSecurityRestrictions": [
{
"ipAddress": "AzureFrontDoor.Backend",
"action": "Allow",
"tag": "ServiceTag",
"priority": 100,
"name": "Front Door Access Only",
"description": "Rule to allow front door access",
"headers": {
"x-azure-fdid": [
"[parameters('frontDoorID')]"
]
}
},
{
"ipAddress": "Any",
"action": "Deny",
"priority": 2147483647,
"name": "Deny all",
"description": "Deny all access"
}
],
当我运行我的手臂模板时,我没有看到任何错误。当我去已部署的资源导出已部署的模板时,headers 设置不在已部署的资源中。我是reviewing the docs here,我不确定自己做错了什么。
"ipSecurityRestrictions": [
{
"ipAddress": "AzureFrontDoor.Backend",
"action": "Allow",
"tag": "ServiceTag",
"priority": 100,
"name": "Front Door Access Only",
"description": "Rule to allow front door access"
},
{
"ipAddress": "Any",
"action": "Deny",
"priority": 2147483647,
"name": "Deny all",
"description": "Deny all access"
}
],
我发现一个other stackoverflow 问题与我的问题相同——但这对我不起作用。
【问题讨论】:
标签: azure azure-web-app-service azure-resource-manager arm-template azure-front-door