ash-jc-allen / short-url

A Laravel package for creating shortened URLs for your web apps.
MIT License
1.27k stars 161 forks source link

Allow configuring additional url schemes #287

Closed lewis-smith closed 4 months ago

lewis-smith commented 4 months ago

For mobile apps it's sometimes desirable to shorten deep links.

ash-jc-allen commented 4 months ago

Hey @lewis-smith, I love this idea!

I'm wondering if it'd be better using a short-url.allowable-url-schemes config value instead? That way, in the package's config file, we could have http:// and https:// already set in there and any more could be added to that list in the dev's overridden config file. I guess this could be handy because the dev could also remove the http:// prefix if they only want to allow https:// URLs too. Do you have any thoughts on this? 🙂

lewis-smith commented 4 months ago

@ash-jc-allen I'm glad you like the idea :)

From my perspective, in the short term I just want to create links to my app and so as long as I can do that I'm happy to go with whatever approach your recommend :)

I suppose the risk with your approach is that if you move http and https into config it would break existing installs? Maybe just http goes to config?

ash-jc-allen commented 4 months ago

@lewis-smith Sweet! I should have a bit of free time later today, so I'll make a couple of small updates to this PR and then get it merged 😄

ash-jc-allen commented 4 months ago

Hey @lewis-smith! Huge thanks again for this idea. I've made a couple of small changes and got it merged in. I'll get it released shortly 😄