Content-Security-Policy header for web requests #15350
-
Like the permissionsPolicyHeader config option. It would be nice if there was a Content Security Policy header, equivalent where you can set various policies through Craft. Currently you either have to set this through server configuration which usually applies to the whole application, including Craft CMS itself, meaning you will also have to allow any Craft CMS related domains in this policy, or add the header yourself on front end web requests through a module/plugin. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
@jamesmacwhite another option is to try https://github.com/hyperia-sk/yii2-secure-headers, a Yii2 component that allows you to set many specific types of security headers. |
Beta Was this translation helpful? Give feedback.
@jamesmacwhite good news! We settled on a native way to deal with these kind of headers. See #15397 for details (will be included in upcoming 4.11/5.3 release)