Skip to content

Instantly share code, notes, and snippets.

@seanvree
Created January 18, 2018 00:12
Show Gist options
  • Save seanvree/8859fa85bce58343fd67d9c3165e6f94 to your computer and use it in GitHub Desktop.
Save seanvree/8859fa85bce58343fd67d9c3165e6f94 to your computer and use it in GitHub Desktop.
ombi_v3
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<remove value="index.html" />
</files>
</defaultDocument>
<rewrite>
<rules>
<clear />
<rule name="ReverseProxyInboundPlexRequests" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true" />
<serverVariables>
<set name="HTTP_X_REAL_IP" value="$remote_addr" />
<set name="HTTP_X_FORWARDED_FOR" value="$proxy_add_x_forwarded_for" />
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
</serverVariables>
<action type="Rewrite" url="http://localhost:5000/plexrequest/{R:1}" />
</rule>
<rule name="distinbound" enabled="false" stopProcessing="true">
<match url="^/dist/(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_REFERER}" pattern="/plexrequest/" negate="true" />
</conditions>
<action type="Rewrite" url="^/dist/(.*)" />
</rule>
</rules>
<outboundRules>
<clear />
<rule name="ReverseProxyOutboundPlexRequest" preCondition="dist">
<match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^http(s)?://localhost:5000/plexrequest/(.*)" />
<!-- //yourcomain -->
<action type="Rewrite" value="http{R:1}://seanvree.com/plexrequest/dist/$1{R:2}" />
<conditions>
</conditions>
</rule>
<rule name="distoutbound" enabled="false" stopProcessing="true">
<!-- <match url="^/dist/(.*)" /> -->
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_REFERER}" pattern="/plexrequest/" negate="true" />
</conditions>
<!-- <action type="Rewrite" url="^/dist/(.*)" /> -->
</rule>
<preConditions>
<preCondition name="dist">
<add input="{HTTP_REFERER}" pattern="^/dist/(.*)" />
</preCondition>
</preConditions>
</outboundRules>
<rewriteMaps>
<remove name="FTPtoVileVista" />
<rewriteMap name="dist">
<add key="/ombi" value="^/dist/(.*)" />
</rewriteMap>
</rewriteMaps>
</rewrite>
<security>
<authentication>
</authentication>
</security>
<urlCompression doStaticCompression="true" doDynamicCompression="false" />
<httpErrors>
<error statusCode="403" subStatusCode="6" path="C:\inetpub\wwwroot\Maintenance\maintenance.html" responseMode="File" />
<error statusCode="404" subStatusCode="503" path="/maintenance/maintenance.html" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment