I've got Azure Static Web app which is served by custom DNS with Azure front door, running a flutter app and everything works as expected, only allow in users to access with Front door Id in a header. We want to restrict access to dev/staging sites with password configurable in portal (https://learn.microsoft.com/en-us/azure/static-web-apps/password-protection) but there are a few issues
I've tried different routes setting in appsetting but to no avail. Have someone encountered this and would know what else needs to be set up?
We have found an answer to this:
Basically, all that needs to happen in config file of Static Web App, allowed hosts must be specified for your DNS settings
"requiredHeaders": {
"X-Azure-FDID": "xyz"
},
"allowedForwardedHosts": [
"xyz.xy.com",
"www.xyz.xy.com"
]
}
More on the subject: https://learn.microsoft.com/en-us/azure/static-web-apps/front-door-manual#update-static-web-app-configuration