aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_req.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r--src/cowboy_req.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 8fa9927..6f8084f 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -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}) ->