bwibrew/laravel-gnu-terry-pratchett

Keep Sir Terry Pratchett alive forever, in the clacks.

1.2.1 2020-04-28 18:50 UTC

This package is auto-updated.

Last update: 2024-04-29 03:50:54 UTC


README

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,
    ];
}