I have an Azure static web app with the staticwebapp.config.json like so:
"routes": [
{
"route": "/*",
"allowedRoles": ["authenticated"]
}
]
"navigationFallback": {
"rewrite": "index.html",
"exclude": ["/static/media/*.{png,jpg,gif,svg}", "/static/css/*"]
}
This works and all routes need to go through auth. Now, I want to add an exception to the /health route to allow for health check services to see if my site is up and running. How can I do this? I tried adding a route like this:
"routes": [
{
"route": "/health",
"allowedRoles": ["anonymous"]
},
{
"route": "/*",
"allowedRoles": ["authenticated"]
}
]
"navigationFallback": {
"rewrite": "index.html",
"exclude": ["/static/media/*.{png,jpg,gif,svg}", "/static/css/*"]
}
But that does not work, /health route still requires authentication.