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

Support trailing slashes #1090

Closed
bahuma20 opened this issue May 21, 2021 · 3 comments
Closed

Support trailing slashes #1090

bahuma20 opened this issue May 21, 2021 · 3 comments
Labels
experimental feature troubleshooting Tickets in which an issue was happening which was not obvious to solve and required support wontfix

Comments

@bahuma20
Copy link

Currently, when i try to visit an url with a trailing slash after the slug, i get an 404.

Some browsers do that automatically.

Could it be implented that trailing slashes are always removed before finding a slug that matches?

The end result should be a situation, where both of those links work:

  • https://myshort.link/test
  • https://myshort.link/test/
@acelaya
Copy link
Member

acelaya commented May 21, 2021

I was going to consider this a bug (which probably is the case), but at the same time, it's kind of breaking change if the behavior changes and someone was expecting the trailing slash to throw a 404.

Because of that, I will investigate if I can implemente it as an option you can opt-in to.

@acelaya acelaya added troubleshooting Tickets in which an issue was happening which was not obvious to solve and required support wontfix labels Dec 10, 2021
@acelaya
Copy link
Member

acelaya commented Dec 10, 2021

Hey!

I'm going to close this, as it's more complex than I anticipated, and it's actually pretty easy to achieve with any web server:

@acelaya
Copy link
Member

acelaya commented Sep 5, 2022

This will be supported in Shlink 3.3.0, with optional opt-in via env var/config option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental feature troubleshooting Tickets in which an issue was happening which was not obvious to solve and required support wontfix
Projects
None yet
Development

No branches or pull requests

2 participants