IIS等效于"proxy_set_header X-Forwarded-Proto https;" [英] IIS Equivalent of "proxy_set_header X-Forwarded-Proto https;"

查看:268
本文介绍了IIS等效于"proxy_set_header X-Forwarded-Proto https;"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在NGINX中,此配置的IIS等价于什么?

What is the IIS equivalent of this configuration in NGINX?

proxy_set_header X-Forwarded-Proto https;

我正在Windows服务器上运行JetBrains YouTrack,使用IIS作为终止SSL代理,尝试登录时出现此错误:

I am running JetBrains YouTrack on Windows server, using IIS as a terminating SSL proxy, and get this error when trying to log in:

HTTP ERROR 405

Problem accessing /hub/auth/login. Reason:

    HTTP method POST is not supported by this URL
Powered by Jetty://

我的web.config看起来像这样:

My web.config looks like this:

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Reverse Proxy" patternSyntax="ECMAScript" stopProcessing="true">
          <match url="(.*)" />
          <!-- Redirect all requests to non-HTTPS site. -->
          <action type="Rewrite" url="http://my.youtrack.site/{R:1}" logRewrittenUrl="true" />
        </rule>
      </rules>
    </rewrite>
    <handlers>
      <clear />
      <!-- No other handlers required. Must clear them otherwise ASP.NET might try to intercept *.svc paths etc. -->
      <add name="Rewrite" path="*" verb="*" modules="RewriteModule" resourceType="Unspecified" />
    </handlers>
  </system.webServer>
</configuration>

我正在尝试从以下来源寻求解决方案:

I am trying to follow the solution from this source: https://confluence.jetbrains.com/display/YTD65/Linux.+JAR+in+Nginx+Web+Server, but for IIS

推荐答案

找到

这篇关于IIS等效于"proxy_set_header X-Forwarded-Proto https;"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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