Umbraco CMS网站在Azure上作为App Service运行
Umbraco功能之一是允许在给定时间发布内容。发布功能对同一网站(或负载平衡环境中的同一网站的不同服务器)进行HTTP调用。
http://sample-site-umbraco.azurewebsites.net/umbraco/RestServices/ScheduledPublish/Index
由于客户端要求,对网站的访问仅限于给定的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调用被阻止,而不是白名单。
404 - NotFound
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
my.umbraco.com上的
<!-- domain Name for Scheduled Publishing -->
<add allowed="true" domainName="sample-site-umbraco.azurewebsites.net"/>
此解决方案无效。电话仍然被阻止。
如何解决这个问题?是否有任何可以覆盖的功能?
答案 0 :(得分:1)
好的,我找到了解决方案。我认为它会奏效。
我在stackoverflow上找到this question并且它有效:)
解决方案是将所有出站IP地址添加到System.WebServer&gt;安全&gt; ipSecurity&gt; [名单]。
出站IP地址是逗号分隔的ips列表。 您需要将所有这些添加到web.config中的WhiteList。
我不确定出站Ips列表是否是静态的,将来不会改变...