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.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 4cb5636..4ad2321 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -470,7 +470,9 @@ parse_header(Name, Req, Default)
when Name =:= <<"if-modified-since">>;
Name =:= <<"if-unmodified-since">> ->
parse_header(Name, Req, Default, fun cowboy_http:http_date/1);
-parse_header(Name = <<"sec-websocket-protocol">>, Req, Default) ->
+parse_header(Name, Req, Default)
+ when Name =:= <<"sec-websocket-protocol">>;
+ Name =:= <<"x-forwarded-for">> ->
parse_header(Name, Req, Default,
fun (Value) ->
cowboy_http:nonempty_list(Value, fun cowboy_http:token/2)