IIS Reverse Proxy and PlexRequests

The following details how to setup IIS (preferably in your DMZ) to reverse proxy requests to wherever you have PlexRequests running. You'll need to have chocolatey installed so you can install both URL Rewrite and Application Request Routing (ARR). In the example web.config file below '1.1.1.1' is my inside host running plexrequests. 

The following text will be your web.config. Place the below contents into a file named 'web.config' in whatever your plexrequests physical directory was. 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://1.1.1.1:3000/{R:1}" />
                </rule>
            </rules>
            <outboundRules>
                <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
                    <match filterByTags="A, Form, Img" pattern="^http(s)?://1.1.1.1:3000/(.*)" />
                    <action type="Rewrite" value="http{R:1}://plexrequests.fqdn.com/{R:2}" />
                </rule>
                <preConditions>
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    </preCondition>
                </preConditions>
            </outboundRules>
        </rewrite>
    </system.webServer>
</configuration>