NAME
Plack::Middleware::Acme::AAHTTPHeader - Add ASCII Art into HTTP Header
SYNOPSIS
enable 'Acme::AAHTTPHeader';
See HTTP header from a server.
$ curl -sD /dev/stdout http://127.0.0.1:5000/
HTTP/1.0 200 OK
Date: Sat, 04 Jul 2020 01:15:52 GMT
Server: HTTP::Server::PSGI
x-happy001: .
x-happy002: . . -:- . . .
x-happy003: .'.:,'. . . . ' . . \ | / .
x-happy004: .'.;.`. ._. ! ._. \ .__\:/__.
x-happy005: `,:.' ._\!/_. .';`. . ' .
x-happy006: ,' . ! . ,., ..======.. .:.
x-happy007: , . ._!_. ||::: : | . ',
x-happy008: .====., . ; .~.===: : : :| ..===.
x-happy009: |.::'|| .=====., ..=======.~, |"|: :|::::::| ||:::|=====|
x-happy010: ___| :::|!__., |:::::|!_, |: :: ::|"|l_l|"|:: |:;;:::|___!| ::|: : :|
x-happy011: |: :|::: |:: |!__|; :: |: |===::: :: :|"||_||"| : |: :: :|: : |:: |:::::|
x-happy012: |:::| _::|: :|:::|:===:|::|:::|:===F=:|"!/|\!"|::F|:====:|::_:|: :|::__:|
x-happy013: !_[]![_]_!_[]![]_!_[__]![]![_]![_][I_]!//_:_\\![]I![_][_]!_[_]![]_!_[__]!
x-happy014: -----------------------------------"---''''```---"-----------------------
x-happy015: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |= _ _:_ _ =| _ _ _ _ _ _ _ _ _ _ _ _
x-happy016: |= : =| Valkyrie
x-happy017: _____________________________________L___________J________________________
x-happy018: --------------------------------------------------------------------------
DESCRIPTION
Plack::Middleware::Acme::AAHTTPHeader is the Plack middleware to add ASCII Art into HTTP Header.
METHODS
There are 2 methods to customize HTTP Header.
enable 'Acme::AAHTTPHeader',
key => 'easy',
aa => <<'_AA_';
,,__
.. .. / o._) .---.
/--'/--\ \-'|| .----. .' '.
/ \_/ / | .' '..' '-.
.'\ \__\ __.'.' .' i-._
)\ | )\ | _.'
// \\ // \\
||_ \\|_ \\_
mrf '--' '--'' '--'
_AA_
aa($text)
Setter of ASCII Art text. By default, it's AA of fireworks.
key($text : 'happy')
Setter of the key for HTTP Header
call =head2 prepare_app
OTHER EXAMPLE
plackup App like below,
use Acme::SuddenlyDeath;
enable 'Acme::AAHTTPHeader',
key => 'you',
aa => sudden_death('Do NOT scrape!');
sub { [ 200, ['Content-Type' => 'text/plain'], ['OK'] ] };
Then,
$ curl -sD /dev/stdout http://127.0.0.1:5000/
HTTP/1.0 200 OK
Date: Sat, 04 Jul 2020 01:38:47 GMT
Server: HTTP::Server::PSGI
x-you001: _人人人人人人人人_
x-you002: > Do NOT Scrape! <
x-you003:  ̄^Y^Y^Y^Y^Y^Y^Y^ ̄
Content-Length: 2
A Bot doesn't see this though :)
REPOSITORY
Plack::Middleware::Acme::AAHTTPHeader is hosted on github: http://github.com/bayashi/Plack-Middleware-Acme-AAHTTPHeader
I appreciate any feedback :D
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
Deprecating the "X-" Prefix https://www.ietf.org/rfc/rfc6648.txt
LICENSE
Plack::Middleware::Acme::AAHTTPHeader
is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. (Note that, unlike the Artistic License 1.0, version 2.0 is GPL compatible by itself, hence there is no benefit to having an Artistic 2.0 / GPL disjunction.) See the file LICENSE for details.