title: IIS Equivalent of "proxy_set_header X-Forwarded-Proto https;"
body: <p>What is the IIS equivalent of this configuration in NGINX?</p>
  
  <p><code>proxy_set_header        X-Forwarded-Proto https;</code></p>
  
  <p>I am running JetBrains YouTrack on Windows server, using IIS as a terminating SSL proxy, and get this error when trying to log in:</p>
  
  <pre><code>HTTP ERROR 405
  
  Problem accessing /hub/auth/login. Reason:
  
      HTTP method POST is not supported by this URL
  Powered by Jetty://
  </code></pre>
  
  <p>My web.config looks like this:</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;rewrite&gt;
        &lt;rules&gt;
          &lt;rule name="Reverse Proxy" patternSyntax="ECMAScript" stopProcessing="true"&gt;
            &lt;match url="(.*)" /&gt;
            &lt;!-- Redirect all requests to non-HTTPS site. --&gt;
            &lt;action type="Rewrite" url="http://my.youtrack.site/{R:1}" logRewrittenUrl="true" /&gt;
          &lt;/rule&gt;
        &lt;/rules&gt;
      &lt;/rewrite&gt;
      &lt;handlers&gt;
        &lt;clear /&gt;
        &lt;!-- No other handlers required. Must clear them otherwise ASP.NET might try to intercept *.svc paths etc. --&gt;
        &lt;add name="Rewrite" path="*" verb="*" modules="RewriteModule" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I am trying to follow the solution from this source: <a href="https://confluence.jetbrains.com/display/YTD65/Linux.+JAR+in+Nginx+Web+Server" rel="noreferrer">https://confluence.jetbrains.com/display/YTD65/Linux.+JAR+in+Nginx+Web+Server</a>, but for IIS</p>