From ef58e15547ee171a716eaa768374e2e7e2f7d397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 25 Oct 2017 20:17:21 +0100 Subject: Introduce cowboy_req:sock/1 and cowboy_req:cert/1 To obtain the local socket ip/port and the client TLS certificate, respectively. --- doc/src/manual/cowboy_req.asciidoc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc/src/manual/cowboy_req.asciidoc') diff --git a/doc/src/manual/cowboy_req.asciidoc b/doc/src/manual/cowboy_req.asciidoc index 7f026c3..b038764 100644 --- a/doc/src/manual/cowboy_req.asciidoc +++ b/doc/src/manual/cowboy_req.asciidoc @@ -29,6 +29,12 @@ and to read the body once. == Exports +Connection: + +* link:man:cowboy_req:peer(3)[cowboy_req:peer(3)] - Peer address and port +* link:man:cowboy_req:sock(3)[cowboy_req:sock(3)] - Socket address and port +* link:man:cowboy_req:cert(3)[cowboy_req:cert(3)] - Client TLS certificate + Raw request: * link:man:cowboy_req:method(3)[cowboy_req:method(3)] - HTTP method @@ -41,7 +47,6 @@ Raw request: * link:man:cowboy_req:uri(3)[cowboy_req:uri(3)] - Reconstructed URI * link:man:cowboy_req:header(3)[cowboy_req:header(3)] - HTTP header * link:man:cowboy_req:headers(3)[cowboy_req:headers(3)] - HTTP headers -* link:man:cowboy_req:peer(3)[cowboy_req:peer(3)] - Peer address and port Processed request: @@ -129,7 +134,9 @@ req() :: #{ path := binary(), %% case sensitive qs := binary(), %% case sensitive headers := cowboy:http_headers(), - peer := {inet:ip_address(), inet:port_number()} + peer := {inet:ip_address(), inet:port_number()}, + sock := {inet:ip_address(), inet:port_number()}, + cert := binary() | undefined } ---- -- cgit v1.2.3