Result:
found 125 distributions and 295 files matching your query ! ( run in 0.948 )


XML-LibXML-Proxy

 view release on metacpan or  search on metacpan

lib/XML/LibXML/Proxy.pm  view on Meta::CPAN

			proxy_cache_valid any 1m;
			proxy_cache_key "$scheme:$proxy_host:$request_uri";
			proxy_pass $scheme://$host$request_uri;
			proxy_set_header Host $http_host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_ignore_headers "Set-Cookie";
		}
	}

=head1 AUTHOR

 view all matches for this distribution


Zonemaster-GUI

 view release on metacpan or  search on metacpan

lib/Zonemaster/GUI/Dancer/Frontend.pm  view on Meta::CPAN

    return to_json( { result => $result } );
};

sub get_ip {
    my $ip = request->address;
    $ip = request->header('X-Forwarded-For') if (($ip =~ /127\.0\.0\.1/ || $ip =~ /::1/) && request->header('X-Forwarded-For'));
    $ip =~ s/::ffff:// if ( $ip =~ /::ffff:/ );
    
    return $ip;
}

 view all matches for this distribution


disbatch

 view release on metacpan or  search on metacpan

etc/disbatch/nginx-default.conf-example  view on Meta::CPAN


    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:8080;
    }
}

 view all matches for this distribution


eris

 view release on metacpan or  search on metacpan

lib/eris/log/context/caddy.pm  view on Meta::CPAN

our $VERSION = '0.009'; # VERSION


sub sample_messages {
    my @msgs = split /\r?\n/, <<'EOF';
Jul  4 23:37:51 app2 caddy[2140]: {"level":"info","ts":1751672271.1656768,"logger":"http.log.access.log7","msg":"handled request","request":{"remote_ip":"172.69.176.57","remote_port":"44552","client_ip":"172.69.176.57","proto":"HTTP/2.0","method":"GE...
Jul  4 23:37:52 app2 caddy[2140]: {"level":"info","ts":1751672272.5860772,"logger":"http.log.access.log7","msg":"handled request","request":{"remote_ip":"162.158.106.254","remote_port":"28088","client_ip":"162.158.106.254","proto":"HTTP/2.0","method"...
EOF
    return @msgs;
}


lib/eris/log/context/caddy.pm  view on Meta::CPAN


    my %ctx = ();
    if ( my $r = $c->{request} ) {
        $ctx{src_ip} = $r->{$_} for qw(remote_ip client_ip);
        if ( my $h = $r->{headers} ) {
            foreach my $k ( qw(X-Forwarded-For Cf-Connecting-Ip) ) {
                next unless $h->{$k};
                foreach my $v ( @{ $h->{$k} } ) {
                    $ctx{src_ip} = $v;
                }
            }

 view all matches for this distribution


mod_perl

 view release on metacpan or  search on metacpan

t/hooks/TestHooks/access.pm  view on Meta::CPAN

my $allowed_ips = qr{^(10|127)\.};

sub handler {
    my $r = shift;

    my $fake_ip = $r->headers_in->get('X-Forwarded-For') || "";

    debug "access: " . ($fake_ip =~ $allowed_ips ? "OK\n" : "FORBIDDEN\n");

    return Apache2::Const::FORBIDDEN unless $fake_ip =~ $allowed_ips;

 view all matches for this distribution


( run in 0.948 second using v1.01-cache-2.11-cpan-54e63673c56 )