Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Routify config option to preserve/strip/force the trailing slash on urls #541

Open
jdkdev opened this issue Jan 18, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jdkdev
Copy link
Contributor

jdkdev commented Jan 18, 2024

Describe the feature

We are starting to get some bigger clients that are tracking url and clicks in Google anayltics like hawks. And sometimes it's the direct link they see /my-page/ but then if the user clicks around the SPA and take action it could fire with /my-page as the event url....causing split metrics ..

and spank creates the /my-page/index.html so Cloudflare serves that up as /my-page/ as the 200 and /my-page as the 308 redirect.

Suggestion: maybe trailing slashes should have three options then: force, strip, preserve

Reference:
https://github.com/roxiness/routify/blob/next/lib/runtime/Router/Router.js#L329

Examples

/my-page/ loads and then url updates to /my-page, with this option it would stay /my-page/

@jdkdev jdkdev added the enhancement New feature or request label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant