【发布时间】:2017-05-22 03:44:45
【问题描述】:
上下文
Umbraco CMS 网站在 Azure 上作为应用服务运行
预定发布
Umbraco 的一项功能是允许在给定时间发布内容。发布功能对同一网站(或负载平衡环境中的不同服务器但同一网站)进行 HTTP 调用。
API 调用地址:
http://sample-site-umbraco.azurewebsites.net/umbraco/RestServices/ScheduledPublish/Index
IP 安全
由于客户要求,对网站的访问仅限于给定的 IP 地址列表。此任务正在通过 web.config 中的 IP 安全限制完成。
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="52428800" />
</requestFiltering>
<ipSecurity allowUnlisted="false" denyAction="NotFound">
<!-- "clear" removes all upstream restrictions -->
<clear />
<!-- permit the loopback address -->
<add ipAddress="127.0.0.1" allowed="true" />
...
...
...
<!-- domain Name for Scheduled Publishing -->
<add allowed="true" domainName="sample-site-umbraco.azurewebsites.net"/>
</ipSecurity>
</security>
问题
当 IP 安全开启时,发布 API 的 HTTP 调用被阻止,因为它不是白名单。
API调用响应状态码及内容:
404 - NotFound
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
Problem Thread our.umbraco.com
修复尝试
将 domainName 添加到允许条目列表中
<!-- domain Name for Scheduled Publishing -->
<add allowed="true" domainName="sample-site-umbraco.azurewebsites.net"/>
此解决方案不起作用。通话仍被阻止。
问题
如何解决这个问题?有没有可以覆盖的功能?
【问题讨论】:
标签: asp.net azure security umbraco azure-web-app-service