class Alfodr::Pipe::ClientIp
- Alfodr::Pipe::ClientIp
- Alfodr::Pipe::Base
- Reference
- Object
Overview
Handler to determine real client IP address when Alfodr is behind trusted reverse proxy or proxies, and save it to context.client_ip.
Reverse proxy should pass client IP in a header such as "X-Forwarded-For". In case of multiple values in a header, the leftmost one is used.
For this functionality to not cause security concerns, all trusted, public-facing reverse proxies should delete the header if request is coming from an untrusted client before appending their own, valid value.
Defined in:
alfodr/pipes/client_ip.crConstructors
Instance Method Summary
-
#call(context : HTTP::Server::Context)
Execution of this handler.
Instance methods inherited from class Alfodr::Pipe::Base
call(context : HTTP::Server::Context)
call
Constructor Detail
Instance Method Detail
def call(context : HTTP::Server::Context)
#
Description copied from class Alfodr::Pipe::Base
Execution of this handler.