Skip to content

Instantly share code, notes, and snippets.

@eimajtrebor
Last active August 17, 2018 14:29
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 eimajtrebor/c2a2c5185c7cc280bb39c310abbf8332 to your computer and use it in GitHub Desktop.
Save eimajtrebor/c2a2c5185c7cc280bb39c310abbf8332 to your computer and use it in GitHub Desktop.
React Web.Config for Azure App Service Deployment using Easy Auth
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
<add input="{REQUEST_URI}" pattern="^/\.(auth)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment