| 1 | package Plack::App::Proxy::Anonymous; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Plack::App::Proxy::Anonymous - anonymous proxy requests | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | =for markdown ```perl | ||
| 10 | |||
| 11 | # In app.psgi | ||
| 12 | use Plack::Builder; | ||
| 13 | use Plack::App::Proxy::Anonymous; | ||
| 14 | |||
| 15 | builder { | ||
| 16 | enable "Proxy::Requests"; | ||
| 17 | Plack::App::Proxy::Anonymous->new->to_app; | ||
| 18 | }; | ||
| 19 | |||
| 20 | =for markdown ``` | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | This module extends L<Plack::App::Proxy>. It doesn't add own headers which | ||
| 25 | could trace an origin of the request. | ||
| 26 | |||
| 27 | =for readme stop | ||
| 28 | |||
| 29 | =cut | ||
| 30 | |||
| 31 | 2 | ▶ | use 5.006; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | |||
| 33 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | |||
| 36 | 2 | our $VERSION = '0.0100'; | |
| 37 | |||
| 38 | 2 | ▶ | use parent qw(Plack::App::Proxy); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | |||
| 40 | 0 | ▶ | sub build_headers_from_env { |
|
Subroutine
build_headers_from_env: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 41 | 0 | my ($self, $env, $req) = @_; | |
| 42 | 0 | my $headers = $req->headers->clone; | |
| 43 | 0 | return +{%$headers}; | |
| 44 | } | ||
| 45 | |||
| 46 | 2 | 1; | |
| 47 | |||
| 48 | __END__ | ||