I'm a beginner at IIS configuration and I'm having some problems configuring a reverse proxy on my public IIS server to serve as a reverse proxy for a service in a docker container in another internal server.
So far it's been working fine, but I'm having some problems with the response of one specific request not being received completely when accessed over the internet but still responding with a 200 status
but when I go to the same page over the internet the last few characters are being cut off
I noticed the response headers were a bit different which lead me to these posts and SO answers: https://techcommunity.microsoft.com/t5/iis-support-blog/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world/ba-p/846222
https://stackoverflow.com/a/15936632/7023800
and so far my web.config rewrites looks like this:
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://my.internal.server:3000/{R:1}" logRewrittenUrl="true" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^http(s)?://my.internal.server:3000/(.*)" />
<action type="Rewrite" value="http{R:1}://my.external.server/{R:2}" />
</rule>
<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
<action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
</rule>
<preConditions>
<preCondition name="NeedsRestoringAcceptEncoding">
<add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
I also tried to increase the response buffering limit in my Site from 4MB to 64MB
and the Response buffer threshold in my IIS reverse proxy server ARR (i increased it up to 1024 KB and still doesn't work) (ARR does not send Response.Flush content to client & IIS reverse-proxy not sending full response body)
But it still doesn't work as expected.
Any help would be really appreciated.
Thank you in advance.





