Azure / Azure/static-web-apps

[Proposal] Allow multiple response overrides

Open
#528 0 comments 6 reactions 0 assignees View on GitHub
config enhancement
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Current the SWA configuration file only allow one response override for every HTTP status, which is very limiting.
For example if you're building an app with different localizations bundles, like `/` for the `en` version and `fr/*`, `es/*` etc for the localized version, you cannot configure localized 404 (and others) overrides, only one can exist for the whole SWA.
Angular works likes this using the built-in i18n system: https://angular.io/guide/i18n#deploy-locales, and other frameworks with static builds too.

Netlify doesn't have this limitation, and allows to defined which routes needs to be redirected: https://docs.netlify.com/routing/redirects/redirect-options/#http-status-codes

**Describe the solution you'd like**
In the same idea as proposed in https://github.com/Azure/static-web-apps/issues/527, allowing to set and array for each of the HTTP codes overrides along with an `include` or `source` property to target only specific route paths would work.

**Additional context**
Also related: https://github.com/Azure/static-web-apps/issues/527

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.