Azure / Azure/static-web-apps

Route redirect url encoding

Open
#1,200 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

staticwebapp.config.json
```
{
"routes": [
{
"route": "/tiktok",
"redirect": "https://www.tiktok.com/@myuser",
"statusCode": 301
}
}
```

When navigating to `https://myapp.com/tiktok` redirects to `https://www.tiktok.com/%40myuser`

According to [RCF 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.3) the @ sign is a valid url component and should not be encoded

Also more generally speaking I agree with what was said in #1007

> the service should not be URL encoding what we enter for redirect values without us explicitly telling it to. In other words, our redirect URLs should function exactly as we have written them.

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.