Azure阻止了来自同一服务器的请求 [英] Azure is blocking request that come from the same server

查看:142
本文介绍了Azure阻止了来自同一服务器的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Umbraco CMS网站作为应用程序服务在Azure上运行

Umbraco CMS website runs on Azure as App Service

Umbraco的功能之一是允许在给定的时间发布内容.发布功能对负载均衡环境中的同一网站(或其他服务器,但同一网站)进行HTTP调用.

One of the Umbraco functionalities is to allow to publish content on a given time. The publish functionality makes a HTTP call to same web site (or a different server but same website in load balanced environment).

http://sample-site-umbraco.azurewebsites.net/umbraco/RestServices/ScheduledPublish/Index

IP安全性

由于客户端要求,对该站点的访问仅限于给定的IP地址列表.正在完成web.config中IP安全限制的任务.

IP Security

Due to client requirements, access to the site is restricted to a given list of IP addresses. This task is being completed with IP Security restriction in web.config.

<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调用被阻止,而不是白名单中的一个.

Problem

When IP Security is turned on, the HTTP call to publish API is being blocked as not white listed one.

404 - NotFound
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

问题线程在our.umbraco.com

Problem Thread on our.umbraco.com

<!-- domain Name for Scheduled Publishing -->
<add allowed="true" domainName="sample-site-umbraco.azurewebsites.net"/>

此解决方案不起作用.通话仍被阻止.

This solution doesn't work. Calls are still being blocked.

该如何解决?有没有可以覆盖的功能?

How this can be fixed? Is there any functionality that can be override?

推荐答案

好,我找到了解决方案.我认为它将起作用.

Ok, I've found the solution. I think it will work.

我在stackoverflow上找到了这个问题,它可以正常工作:)

I've found this question on stackoverflow and it worked :)

解决方案是将所有出站IP地址添加到System.WebServer>安全性> ipSecurity> [列表].

Solution is to add ALL outbound IP addresses into System.WebServer > Security > ipSecurity > [List].

出站IP地址是逗号分隔的IP列表. 您需要将它们全部添加到web.config中的WhiteList中.

Outbound Ip Addresses are comma separated list of ips. You need to add all of them to the WhiteList in web.config.

我不确定出站Ips列表是否是静态的,以后不会更改...

I'm not sure if the list of Outbound Ips is static and will not change in the future...

这篇关于Azure阻止了来自同一服务器的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆