-
Notifications
You must be signed in to change notification settings - Fork 21
1.x to 2.0 migration guide
SecureHeaders now has a namespace, so you should now use the line
use Aidantwoods\SecureHeaders\SecureHeaders;somewhere, or all the class via the full namespace location.
-
doneOnOutputanddoneare nowapplyOnOutputandapply. These new methods allow custom HttpAdapters to be used (so you can integrate more easily with frameworks), but if you supply no arguements the "global" HttpAdaper will be used (i.e. interact directly with PHPsheader()and similar functions). -
addHeaderhas been removed. You should add headers withheader()or via your framework now. -
correctHeaderNamehas been removed. Please ensure your header names are correct.
-
Strict Mode now includes injecting the
SameSitecookie attribute. -
Strict Mode now includes the
Expect-CT: max-age=31536000; enforceas a header proposal. -
If you are using PHP 5.3 you'll have to upgrade your PHP installation before you can follow us in to 2.0.
-
New header proposal by default:
X-Permitted-Cross-Domain-Policies: none. As a reminder, a header proposal is a header which will be added unless you have explicitly set the header to a different value, or told SecureHeaders to remove it. -
New header proposal by default:
Referrer-Policy: strict-origin-when-cross-origin, with a secondary fallback setting asReferrer-Policy: no-referrer(in case that browser does not support the former). As a reminder, a header proposal is a header which will be added unless you have explicitly set the header to a different value, or told SecureHeaders to remove it.