aisasemi / sri
Laravel Subresource Integrity
v1.0.0
2020-10-25 02:53 UTC
Requires
- illuminate/support: ~7|~8
Requires (Dev)
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
README
A small addon to add sri to your laravel application in a simple way.
Installation
Via Composer
$ composer require aisasemi/sri
Usage
There are 2 methods that we can use.
- get
- php
$integrity = $sri->get('path/to/asset');
- blade
@sri('path/to/asset');
- php
- html
- php
$htmltag = $sri->html('path/to/asset'); $htmltag = $sri->html('path/to/asset', 'anonymous');
- blade
@srihtml('path/to/asset'); @srihtml('path/to/asset', 'anonymous');
- php
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
license. Please see the license file for more information.