Created
June 21, 2019 01:04
-
-
Save BananaAcid/e27d0ae5aeb6f9c73f7b61e6daadbfce to your computer and use it in GitHub Desktop.
reverse proxy to couchdb on IIS
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> | |
<rules> | |
<rule name="ReverseProxyInboundRule1" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<!-- disable login ! only locally allowed: http://localhost:5984/_utils/#login --> | |
<add input="{PATH_INFO}" pattern="^(.*)/_utils/(.*)" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="http://localhost:5984/{R:1}" /> | |
</rule> | |
</rules> | |
<outboundRules> | |
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1"> | |
<match filterByTags="A, Form, Img" pattern="^http(s)?://localhost:5984/(.*)" /> | |
<action type="Rewrite" value="http{R:1}://service.saatling.de/{R:2}" /> | |
</rule> | |
<preConditions> | |
<preCondition name="ResponseIsHtml1"> | |
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> | |
</preCondition> | |
</preConditions> | |
</outboundRules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment