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
However, this normalization seems to bypass middleware logic. As a result, middleware doesn't execute as expected for the raw incoming URL.
Steps to Reproduce:
Create an Astro project with a middleware to log requests or process specific slugs.
Access a URL with multiple trailing slashes (e.g., //////////).
Observe that the middleware does not execute correctly for the normalized path.
What's the expected result?
Astro should identify and process URLs with multiple trailing slashes correctly, ensuring middleware functions execute as intended.
Current Behavior:
URLs with trailing slashes are normalized by Astro, but middleware logic does not handle the original raw URL, causing inconsistencies.
Hello @tordans @altano @madbook
Astro Info
If this issue only occurs in one browser, which browser is a problem?
All Browser
Describe the Bug
When accessing URLs with multiple trailing slashes, such as:
https://vegasaces.com/games/slots/lucky-dama-muerta//////////
The URL is automatically normalized in the backend to:
/games/slots/lucky-dama-muerta/
However, this normalization seems to bypass middleware logic. As a result, middleware doesn't execute as expected for the raw incoming URL.
Steps to Reproduce:
Create an Astro project with a middleware to log requests or process specific slugs.
Access a URL with multiple trailing slashes (e.g., //////////).
Observe that the middleware does not execute correctly for the normalized path.
What's the expected result?
Astro should identify and process URLs with multiple trailing slashes correctly, ensuring middleware functions execute as intended.
Current Behavior:
URLs with trailing slashes are normalized by Astro, but middleware logic does not handle the original raw URL, causing inconsistencies.
Link to Minimal Reproducible Example
https://vegasaces.com/games/slots/lucky-dama-muerta//////////
Participation
The text was updated successfully, but these errors were encountered: