We are running IIS 10 on Windows Server 2019. We are running EmbedIO on the local server on localhost. In IIS we have created Reverse Proxy rules using URL rewrite. The website comes up without any issue the first time you load the page. If you hit refresh the the browser displays the following error:
HTTP Error 500.52 - URL Rewrite Module Error.*
Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded (“gzip”).
If you hit refresh again and the page loads normally. This happens over and over again where page loads correctly and then you hit refresh and you receive the this:
500.52 error message
Below is the web config file we are using. I have changed the name of our server for security purposes. Does anyone see anything wrong with our config or can they suggest anything I can change to the rules?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<rewrite>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^http(s)?://localhost:8686/(.*)" />
<action type="Rewrite" value="http{R:1}://server1.mydomain.com/{R:2}" />
</rule>
<preConditions>
<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://localhost:8686/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
</configuration>
Thanks in advance,
-mike