Skip to content

Instantly share code, notes, and snippets.

@mattou07
Created May 9, 2020 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattou07/050f13c0869c1d1c4c35c1bb708fa76b to your computer and use it in GitHub Desktop.
Save mattou07/050f13c0869c1d1c4c35c1bb708fa76b to your computer and use it in GitHub Desktop.
Xml Test
<rule name="RestrictBackOffice" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{URL}" pattern="/Umbraco/*" />
<add input="{URL}" pattern="/Umbraco/surface/*" negate="true" />
<add input="{REMOTE_ADDR}" pattern="Your-IP" negate="true"/>
<add input="{REMOTE_ADDR}" pattern="Another-IP" negate="true"/>
<add input="{REMOTE_ADDR}" pattern="127.0.0.1" negate="true"/>
<add input="{HTTP_X_FORWARDED_FOR}" pattern="Your-IP" negate="true"/>
<add input="{HTTP_X_FORWARDED_FOR}" pattern="Another-IP" negate="true"/>
<add input="{HTTP_X_FORWARDED_FOR}" pattern="127.0.0.1" negate="true"/>
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="File or directory not found." statusDescription="The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." />
</rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment