mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Parse the x-forwarded-for header as a list of tokens
This commit is contained in:
parent
be94cb12aa
commit
67beb4d01d
1 changed files with 3 additions and 1 deletions
|
@ -470,7 +470,9 @@ parse_header(Name, Req, Default)
|
||||||
when Name =:= <<"if-modified-since">>;
|
when Name =:= <<"if-modified-since">>;
|
||||||
Name =:= <<"if-unmodified-since">> ->
|
Name =:= <<"if-unmodified-since">> ->
|
||||||
parse_header(Name, Req, Default, fun cowboy_http:http_date/1);
|
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,
|
parse_header(Name, Req, Default,
|
||||||
fun (Value) ->
|
fun (Value) ->
|
||||||
cowboy_http:nonempty_list(Value, fun cowboy_http:token/2)
|
cowboy_http:nonempty_list(Value, fun cowboy_http:token/2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue