File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Add security related headers to HTTP response. The package includes Service Prov
2222
2323### Supported Laravel Version
2424
25- 5.1 ~ 11 .x
25+ 5.1 ~ 12 .x
2626
2727## Installation
2828
@@ -64,12 +64,20 @@ Publish config file
6464php artisan vendor:publish --provider=" Bepsvpt\SecureHeaders\SecureHeadersServiceProvider"
6565```
6666
67- Add global middleware in ` app/Http/Kernel.php `
67+ Add global middleware in ` app/Http/Kernel.php ` ( laravel version < 12 )
6868
6969``` php
7070\Bepsvpt\SecureHeaders\SecureHeadersMiddleware::class,
7171```
7272
73+ Add global middleware in ` bootstrap/app.php ` ( laravel version >= 12 )
74+
75+ ``` php
76+ ->withMiddleware(function (Middleware $middleware): void {
77+ $middleware->append(\Bepsvpt\SecureHeaders\SecureHeadersMiddleware::class);
78+ })
79+ ```
80+
7381Set up config file ` config/secure-headers.php `
7482
7583Done!
You can’t perform that action at this time.
0 commit comments