aws-amplify / aws-amplify/amplify-hosting
Bulk redirect editor does not save country conditions
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### App Id
dv9w89pivcsv7
### AWS Region
us-east-1
### Amplify Hosting feature
Redirects
### Describe the bug
It is not possible to save redirects that include a region condition using the bulk redirect editor. Conditions can only be added individually in the form-based editor. But even if you do add conditions manually, opening and saving the bulk editor clears conditions from *all* existing redirects.
### Expected behavior
Expect that providing properly formatted JSON for redirects that include conditions will be applied on save.
### Reproduction steps
1. Visit the Rewrites and Redirects settings, click Edit

3. Click "open text editor"
4. Paste redirects JSON. Example:
```json
[
{
"source": "/",
"target": "/de",
"status": "302",
"condition": ""
}
]
```

5. Click Save
6. Confirm that the saved redirect does not include the country code condition specified in the JSON

### Build Settings
_No response_
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
Contributor guide
Research direction
Start in the Rewrites and Redirects settings and reproduce the failure through the bulk text editor using the JSON example in the report. Trace how redirect conditions are parsed and saved; done means a country condition survives saving and existing conditions are not cleared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100