This page will guide you through setting up the Reverse Proxy configuration for Yavli Resilience on IIS.
To install ARR 2(it also includes the URL Rewrite Module), please follow this official Microsoft guide:
http://www.iis.net/learn/extensions/installing-application-request-routing-%28arr%29/install-application-request-routing-version-2
You can also use Microsoft’s Web Platform Installer(WebPI) to install it.
HTTP Version: Pass-through Keep Alive: Checked Time-out: 120 seconds Reverse rewrite host in response headers: Checked Preserve client IP in the following header: X-Forwarded-For Include TCP port from client IP: Checked Forwarding proxy header value: Leave blank. Memory cache duration: 60 seconds Enable disk cache: Checked Enable request consolidation: Not checked Query string support: Ignore query string Response buffer: 4096KB Response buffer threshold: 256KB Proxy server: Leave blank. Use URL Rewrite to inspect incoming requests: Not checked
You are free to optimize the above settings to your needs. The only really important things for us are that the Enable Proxy is checked and that the X-Forwarded-For header is transferred to us.
Please insert the following configuration inside your website’s web.config file:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> ... <rule name="Yavli Image Proxy Redirect" stopProcessing="true"> <match url="(.*\.(|jpg|jpeg|gif|png))$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="http://steg.yavli.com/{R:0}" appendQueryString="false" /> </rule> ... </rules> </rewrite> </system.webServer> </configuration>
Although not required, it is recommended to recycle te Application Pool after making the changes.