繁体   English   中英

有一种方法可以在 azure webapp 上删除 http 到 https 重定向?

[英]There is a way to remove http to https redirection on azure webapp?

问题很简单。 I want to allow http on my azure webapp, but by default it redirects http to https even if "https only" is off. 有没有办法在 azure webaps 上保留 http 协议? 我在谷歌上找到的所有信息都与我想要的相反。

您在这里有两个选择,我更喜欢的一个是将证书应用到您的应用程序。 使用 azure 应用服务免费。 您可以在这篇文章中了解更多信息:

第二个是在 web.config 中应用重定向规则,将任何 https 重定向到 http。

<rule name="Redirect to HTTP" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{HTTPS}" pattern="^ON$" />
  </conditions>
  <action type="Redirect" url="http://{HTTP_HOST}/{R:0}" redirectType="Permanent" />
</rule> 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM