- Please refer to the changelog of version 8.0.0 to make corresponding adjustments based on your existing settings.
- The following new headers are added, you can find it here and copy to your config file.
Cross-Origin-Embedder-Policy
Cross-Origin-Opener-Policy
Cross-Origin-Resource-Policy
feature-policy
was replaced withpermissions-policy
, make sure you addpermissions-policy
config to the config file, you can find it here.
- Add
use-permissions-policy-header
config key forfeature-policy
, you can find it here.
X-Power-By
header renamed toX-Powered-By
.
- Lumen user need to add SecureHeadersMiddleware manually.
- HSTS preload is disabled by default now, if your HSTS config does not contain
preload
key and you want to preserve previous behavior, addpreload
to HSTS section and set totrue
. - Update
csp
config structure from config file.
- The following new headers are added, you can find it here and copy to your config file.
X-Power-By
- HSTS
preload
field can be disabled now, you can find it here and copy to your config file. display-capture
anddocument-domain
are added to Feature-Policy, you can find it here and here.
- The following new headers are added, you can find it here and copy to your config file.
Feature-Policy
- The following new headers are added, you can find it here and here and copy to your config file.
Clear-Site-Data
Server
- The following new headers are added, you can find it here and copy to your config file.
Expect-CT
- HPKP
hashes
field only supports sha256 algorithm, change other algorithms to sha256. - CSP
https-transform-on-https-connections
was removed, dont forget to use the explicit protocol. - CSP
child-src
directive was removed, useframe-src
orworker-src
directive instead. - CSP
img-src
directivedata
field was removed, useschemes
field instead. - CSP directive
hashes
field has new format, you can find it here.
- If you are a Lumen user, change
$app->register(Bepsvpt\SecureHeaders\LumenServiceProvider::class);
to$app->register(Bepsvpt\SecureHeaders\SecureHeadersServiceProvider::class);
inbootstrap/app.php
- Because of dependency changing, please check your Content-Security-Policy(CSP) header is correct after upgrade.
- Rename
config/security-header.php
toconfig/secure-headers.php
- Change provider from
Bepsvpt\LaravelSecurityHeader\SecurityHeaderServiceProvider::class,
toBepsvpt\SecureHeaders\SecureHeadersServiceProvider::class,
inconfig/app.php
- Change middleware from
\Bepsvpt\LaravelSecurityHeader\SecurityHeaderMiddleware::class,
to\Bepsvpt\SecureHeaders\SecureHeadersMiddleware::class,
inapp/Http/Kernel.php
- The following new headers are added, you can find it here and copy to your config file.
X-Download-Options
X-Permitted-Cross-Domain-Policies
Referrer-Policy
- You need to republish the config file and set up according to your need.