2017 © Pedro Peláez
 

silverstripe-module silverstripe-security-headers

image

guttmann/silverstripe-security-headers

  • Thursday, March 1, 2018
  • by guttmann
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,033 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

SilverStripe security headers

Build Status Code Coverage Scrutinizer Code Quality, (*1)

SilverStripe module for easily adding a selection of useful HTTP headers., (*2)

Comes with a default set of headers configured, but can be used to add any headers you wish., (*3)

Install

Install via composer:, (*4)

composer require guttmann/silverstripe-security-headers 1.0.*

Usage

Apply the extension

Apply the SecurityHeaderControllerExtension to the controller of your choice., (*5)

For example, add this to your mysite/_config/config.yml file:, (*6)

Page_Controller:
  extensions:
    - Guttmann\SilverStripe\SecurityHeaderControllerExtension

Configure the headers

Configure header values to suit your site, it's important your config is loaded after the security-headers module's config., (*7)

For example, your mysite/_config/config.yml file might look like this:, (*8)

---
Name: mysite
After:
  - 'framework/*'
  - 'cms/*'
  - 'security-headers/*'
---
Guttmann\SilverStripe\SecurityHeaderControllerExtension:
  headers:
    Content-Security-Policy: "default-src 'self' *.google-analytics.com;"
    Strict-Transport-Security: "max-age=2592000"

Disclaimer

I am not a security expert - the default header values used in this module are based on advice I have received from a number of sources., (*9)

They are not set in stone and if you see any issues please send me a pull request., (*10)

The Versions

01/03 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

01/03 2018

1.0.4

1.0.4.0

  Sources   Download

MIT

The Requires

 

01/03 2018

dev-travis-fix

dev-travis-fix

  Sources   Download

MIT

The Requires

 

09/05 2017

1.0.3

1.0.3.0

  Sources   Download

MIT

The Requires

 

01/02 2016

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

30/03 2015
28/03 2015