In Laravel you can use the signed middleware URL to sign URLs for activation links etc.. There's also a undocumented relative parameter which makes it possible to sign relative URLs.
This is useful if you are using Laravel just as an API and host it somewhere else than your frontend. You can still use your pretty frontend URLs instead of those of the API.
e.g.: instead of signing https://example.com/activate-email
you sign /activate-email
.
You can install the package via composer:
composer require clickbar/laravel-validate-relative-signature
After installing the package is auto-discovered and you now have a signed.relative
middleware to verify signed URLs with a relative URL.
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.