简体   繁体   English

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

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

The question is very simple.问题很简单。 I want to allow http on my azure webapp, but by default it redirects http to https even if "https only" is off. I want to allow http on my azure webapp, but by default it redirects http to https even if "https only" is off. There is a way to keep http protocol at azure webaps?有没有办法在 azure webaps 上保留 http 协议? All the information I find on google is the opposite of what I want.我在谷歌上找到的所有信息都与我想要的相反。

You have two options here, the one I prefer is applying a certificate to your app.您在这里有两个选择,我更喜欢的一个是将证书应用到您的应用程序。 That's free using azure app service.使用 azure 应用服务免费。 You can learn more on this arcticle :您可以在这篇文章中了解更多信息:

The second one is applying a redirect rule within you web.config, redirecting any https to http.第二个是在 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