You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v4.1.2
Node v20.12.0
System macOS (arm64)
Package Manager npm
Output server
Adapter @astrojs/cloudflare
Integrations @astrojs/tailwind
@astrojs/preact
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
We want to redirect user if url contains multiple slashes https://www.example.com/this//is/my/////directory to https://www.example.com/this/is/my/directory
But on the middleware side we do not get raw url : https://www.example.com/this//is/my/////directory
instead we are getting already sanitized version https://www.example.com/this/is/my/directory.
What's the expected result?
Expecting the url in client to be sanitized and not remaining https://www.example.com/this//is/my/////directory
Is there no way to get the original request with raw initial URL somewhere in Astro?
Would that mean that the only way to accomplish that is to put a reverse-proxy in front of Astro where the URL gets sanitized?
One reason for sanitizing URLs is for SEO. Google might think of '/path///other' and /path/other' as two separate things potentially leading to duplicate content.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
We want to redirect user if url contains multiple slashes
https://www.example.com/this//is/my/////directory
tohttps://www.example.com/this/is/my/directory
But on the middleware side we do not get raw url :
https://www.example.com/this//is/my/////directory
instead we are getting already sanitized version
https://www.example.com/this/is/my/directory.
What's the expected result?
Expecting the url in client to be sanitized and not remaining
https://www.example.com/this//is/my/////directory
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-tdbrwm?file=src%2Fmiddleware.ts
Participation
The text was updated successfully, but these errors were encountered: