mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50:24 +00:00
Fix cowboy_req:peer/1
This commit is contained in:
parent
57901a7116
commit
4fed8637b6
3 changed files with 44 additions and 43 deletions
|
@ -194,9 +194,9 @@ method(#{method := Method}) ->
|
|||
version(#{version := Version}) ->
|
||||
Version.
|
||||
|
||||
-spec peer(req()) -> {inet:ip_address(), inet:port_number()} | undefined.
|
||||
peer(Req) ->
|
||||
Req#http_req.peer.
|
||||
-spec peer(req()) -> {inet:ip_address(), inet:port_number()}.
|
||||
peer(#{peer := Peer}) ->
|
||||
Peer.
|
||||
|
||||
-spec host(req()) -> binary().
|
||||
host(#{host := Host}) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue