Azure / Azure/static-web-apps

Azure Static Web App allowedForwardedHosts wildcard domain error

Open
#1,265 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Azure Static Web App does not support wildcard custom domains, so i tried to add a CDN front door so that i can use wildcard domains, but i cannot add a wildcard domain to allowedForwardedHosts inside staticwebapp.config.json.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to 'staticwebapp.config.json'
2. Append:
```
"forwardingGateway": {
"allowedForwardedHosts": [
"*.domain.com"
]
}
```
4. Push to git to activate the publish action

Error:
*.domain.com is not a valid value for a host in allowedForwardedHosts.

- staticwebapp.config.json file:
```
{
"trailingSlash": "auto",
"navigationFallback": {
"rewrite": "index.html",
"exclude": ["/images/*.{png,jpg,gif}", "/css/*", "/js/*"]
},
"forwardingGateway": {
"allowedForwardedHosts": [
"*.domain.com"
]
}
}
```

**Expected behavior**
To either Azure Static Web App support wildcard domains or allow us to use CDN front door to have a wildcard domain.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.