Last active
June 21, 2019 19:44
-
-
Save jakobjs/cdf44f82f445c6c959024ae32722f066 to your computer and use it in GitHub Desktop.
SonarQube IIS reverse proxy config -- USE THE OTHER web.config template please. It includes changes to the request size.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<outboundRules> | |
<rule name="ReverseProxyOutboundRule1" preCondition="IsRedirection"> | |
<match filterByTags="A, Form, Img" serverVariable="RESPONSE_LOCATION" | |
pattern="^http://[^/]+/(.*)" /> | |
<action type="Rewrite" value="https://PUBLIC_SONARQUBE_URL/{R:1}" /> | |
</rule> | |
<preConditions> | |
<preCondition name="IsRedirection"> | |
<add input="{RESPONSE_STATUS}" pattern="3\d\d" /> | |
</preCondition> | |
<preCondition name="ResponseIsHtml1"> | |
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> | |
</preCondition> | |
</preConditions> | |
</outboundRules> | |
<rules> | |
<rule name="ReverseProxyInboundRule1" stopProcessing="true"> | |
<match url="(.*)" /> | |
<action type="Rewrite" url="http://PRIVATE_SONAR_URL:9000/{R:1}" /> | |
<serverVariables> | |
<set name="X_FORWARDED_PROTO" value="https" /> | |
<set name="ORIGINAL_URL" value="{HTTP_HOST}" /> | |
</serverVariables> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment