class Amber::Pipe::ClientIp
- Amber::Pipe::ClientIp
- Amber::Pipe::Base
- Reference
- Object
Overview
Handler to determine real client IP address when Amber 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:
amber/pipes/client_ip.crConstructors
Instance Method Summary
-
#call(context : HTTP::Server::Context)
Execution of this handler.
Instance methods inherited from class Amber::Pipe::Base
call(context : HTTP::Server::Context)
call
Constructor Detail
Instance Method Detail
def call(context : HTTP::Server::Context)
#
Description copied from class Amber::Pipe::Base
Execution of this handler.