Skip to content

BWibrew/laravel-gnu-terry-pratchett

Repository files navigation

GNU Terry Pratchett header for Laravel

Latest Version on Packagist CircleCI StyleCI Codacy grade Codacy coverage

"A man is not dead while his name is still spoken." - Going Postal, Chapter 4 prologue

On the Discworld there is a sort of... internet. This is a series of semaphore towers which span the world and transmit messages in a way that's similar to our world's old telegraph system.

This middleware package uses the idea from this Reddit thread and the numerous other packages and plugins that do similar things.

This middleware package adds the header X-Clacks-Overhead: GNU Terry Pratchett to every HTTP response which passes through the middleware.

Installation

Install using Composer by running:

composer require bwibrew/laravel-gnu-terry-pratchett

Add the GnuPratchettMiddleware class to one of the middleware properties of your app/Http/Kernel.php file.

<?php
// app/Http/Kernel.php
namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    protected $middleware = [
        // ...
        \BWibrew\GnuPratchett\GnuPratchettHeader::class,
    ];
}