Increase Limit or Enhance Flexibility for allowedForwardedHosts in Static Web Apps Configuration
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I am using a Static Web App in conjunction with Azure Front Door, and I have a large number of custom domains attached to a single Front Door route. This setup is necessary due to product requirements, as these custom domains need to be visible to end-users and cannot be replaced with redirects. Additionally, these domains allow for specific URL-based design modifications.
The problem arises in the staticwebapp.config.json configuration. I’ve completed the integration with AAD login using the auth block and needed to specify my domains under the forwardingGateway -> allowedForwardedHosts array. However, after setting up 13 domains (as a test, though I have more), I encountered the following error:
```
No more than 10 allowedForwardedHosts can be specified for the forwardingGateway, but 13 hosts are currently specified.
```
I believe there are other users like me who attach multiple custom domains to a single AFD route. To address this issue, I’d suggest one of the following enhancements:
1. Increase the maximum limit for the allowedForwardedHosts array.
2. Allow the use of wildcards within the allowedForwardedHosts.
3. Provide an option or setting that allows bypassing validation even if allowedForwardedHosts is not explicitly configured.
These changes would provide greater flexibility for scenarios involving multiple custom domains and improve usability for products with similar requirements.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.