2017 © Pedro Peláez
 

library expect-ct-builder

Easily add Excepct-CT header to your project

image

pepeverde/expect-ct-builder

Easily add Excepct-CT header to your project

  • Thursday, July 26, 2018
  • by endelwar
  • Repository
  • 1 Watchers
  • 2 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

Expect-CT Builder

Build Status Scrutinizer Code Quality codecov, (*1)

The Expect-CT HTTP header tells browsers to expect Certificate Transparency. For more information, see this blog post by Scott Helme and the in-progress spec., (*2)

Expect-CT Builder was inspired by ParagonIE\CSPBuilder, (*3)

Usage

<?php

use \Pepeverde\ECTBuilder\ECTBuilder;

$expectCT = new ECTBuilder([
    'enforce' => true,
    'maxAge' => 30,
    'reportUri' => 'https://example.org/report'
]);
$expectCT->sendECTHeader();

Inject an Expect-CT into a PSR-7 message

Instead of invoking sendECTHeader(), you can instead inject the headers into your PSR-7 message object by calling it like so:, (*4)

/**
 * $yourMessageHere is an instance of an object that implements 
 * \Psr\Http\Message\MessageInterface
 *
 * Typically, this will be a Response object that implements 
 * \Psr\Http\Message\ResponseInterface
 *
 * @ref https://github.com/guzzle/psr7/blob/master/src/Response.php
 */
$expectCT->injectECTHeader($yourMessageHere);

The Versions

26/07 2018

dev-develop

dev-develop

Easily add Excepct-CT header to your project

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Manuel Dalla Lana

security http headers expect-ct

26/07 2018

dev-master

9999999-dev

Easily add Excepct-CT header to your project

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Manuel Dalla Lana

security http headers expect-ct

26/07 2018

v1.0.0

1.0.0.0

Easily add Excepct-CT header to your project

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Manuel Dalla Lana

security http headers expect-ct

13/04 2017

v0.9.0

0.9.0.0

Easily add Excepct-CT header to your project

  Sources   Download

MIT

The Requires

  • php ^5.6|^7.0

 

The Development Requires

by Manuel Dalla Lana

security http headers expect-ct