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

Added ability to remove the prefix from default short URLs #123

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

ash-jc-allen
Copy link
Owner

This PR adds the ability to create short URLs with an empty prefix.

If the short-url.prefix config field is set to null, a prefix won't be used in the default short URL when it's stored in the database.

I've not made any changes to the default route in web.php because it appears that Laravel strips double forward slashes, so we don't need to handle this ourselves (as far as I can tell).

@ash-jc-allen ash-jc-allen merged commit 49c1e22 into master Apr 4, 2022
@ash-jc-allen ash-jc-allen deleted the feature/empty-prefix branch April 4, 2022 11:35
@wing5wong
Copy link

wing5wong commented Sep 1, 2022

null prefix appears to cause 404 when using non default route.

Route::get('{shortURLKey}', '\AshAllenDesign\ShortURL\Controllers\ShortURLController'); route defined anywhere in routes file causes all routes to return 404

image

image

image

any route with any other prefix will work but not basic routes
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants