Azure / Azure/static-web-apps

Routing: wildcard variables and fallback routes

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

Description

2 issues i am having with routing:

1. ability to use wildcard as a variable in the redirect/rewrite:
`{
"routes": [
{
"route": "/resource/*",
"rewrite": "/resource-new/:splat
}
]
}`

2. Ability to have a fallback route where if i have an allowedRoles blocking access to a resource, if this route fails due to not being authenticated, to fallback to the next rule with the same route.
`{
"routes": [
{
"route": "/member/*",
"allowedRoles": ["member"]
},
{
"route": "/member/*",
"redirect": "/login-page"
}
]
}`

I am coming from using netlify previously where i was able to achieve the above 2 scenarios via the routing config so am just wondering if it is possible with Azure SWA routing

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.