ash-jc-allen / short-url

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

Whitelisting IPs #196

Closed HeadStudios closed 1 year ago

HeadStudios commented 1 year ago

Any possibility for whitelisting IP addresses? I want to check that link works without counting visit against it before sending

ash-jc-allen commented 1 year ago

Hey @HeadStudios! That's a great suggestion that I think could come in handy. However, I think it might be a bit out of the scope of this package, unfortunately.

I feel like this is something that would be best being implemented directly in your app code. If it was me, I think I'd create a middleware class that checks the IP. You could register this middleware in the short-url.middleware config field. Hopefully this helps a bit? 🙂