Plack::Middleware::TrafficAdvice - handle requests for /.well-known/traffic-advice
version v0.3.0
use JSON::MaybeXS 1.004000; use Plack::Builder; builder { enable "TrafficAdvice", data => [ { user_agent => "prefetch-proxy", disallow => JSON::MaybeXS->true, } ]; ... };
This middle provides a handler for requests for /.well-known/traffic-advice.
/.well-known/traffic-advice
You must specify either a "file" or "data" containing the traffic advice information. (There is no default value.)
This is either an array referece that corresponds to the traffic advice data structure, or a JSON string to return.
The data will be saved as a temporary "file".
This is a file containing the JSON string to return.
The /.well-known/traffic-advice specification is new and may be subject to change.
This does not validate that the "data" string or "file" contains valid JSON, or that the JSON conforms to the specification.
This module requires Perl v5.12 or later.
Future releases may only support Perl versions released in the last ten years.
https://github.com/buettner/private-prefetch-proxy/blob/main/traffic-advice.md
The development version is on github at https://github.com/robrwo/Plack-Middleware-TrafficAdvice and may be cloned from git://github.com/robrwo/Plack-Middleware-TrafficAdvice.git
Please report any bugs or feature requests on the bugtracker website https://github.com/robrwo/Plack-Middleware-TrafficAdvice/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Robert Rothenberg <rrwo@cpan.org>
This software is Copyright (c) 2021-2023 by Robert Rothenberg.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Plack::Middleware::TrafficAdvice, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::TrafficAdvice
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::TrafficAdvice
For more information on module installation, please visit the detailed CPAN module installation guide.