Plack::Middleware::Acme::AAHTTPHeader - Add ASCII Art into HTTP Header
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: --------------------------------------------------------------------------
Plack::Middleware::Acme::AAHTTPHeader is the Plack middleware to add ASCII Art into HTTP Header.
There are 2 methods to customize HTTP Header.
enable 'Acme::AAHTTPHeader', key => 'easy', aa => <<'_AA_'; ,,__ .. .. / o._) .---. /--'/--\ \-'|| .----. .' '. / \_/ / | .' '..' '-. .'\ \__\ __.'.' .' i-._ )\ | )\ | _.' // \\ // \\ ||_ \\|_ \\_ mrf '--' '--'' '--' _AA_
Setter of ASCII Art text. By default, it's AA of fireworks.
Setter of the key for HTTP Header
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 :)
Plack::Middleware::Acme::AAHTTPHeader is hosted on github: http://github.com/bayashi/Plack-Middleware-Acme-AAHTTPHeader
I appreciate any feedback :D
Dai Okabayashi <bayashi@cpan.org>
https://www.asciiart.eu/
Deprecating the "X-" Prefix https://www.ietf.org/rfc/rfc6648.txt
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.
Plack::Middleware::Acme::AAHTTPHeader
To install Plack::Middleware::Acme::AAHTTPHeader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::Acme::AAHTTPHeader
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::Acme::AAHTTPHeader
For more information on module installation, please visit the detailed CPAN module installation guide.