|
@@ -125,7 +125,7 @@ get_protocol_options(Ref) ->
|
|
|
set_protocol_options(Ref, Opts) ->
|
|
|
ranch_server:set_protocol_options(Ref, Opts).
|
|
|
|
|
|
--spec filter_options([{atom(), any()} | {raw, any(), any(), any()}],
|
|
|
+-spec filter_options([inet | inet6 | {atom(), any()} | {raw, any(), any(), any()}],
|
|
|
[atom()], Acc) -> Acc when Acc :: [any()].
|
|
|
filter_options(UserOptions, AllowedKeys, DefaultOptions) ->
|
|
|
AllowedOptions = filter_user_options(UserOptions, AllowedKeys),
|
|
@@ -147,6 +147,8 @@ filter_user_options([Opt = {raw, _, _, _}|Tail], AllowedKeys) ->
|
|
|
true -> [Opt|filter_user_options(Tail, AllowedKeys)];
|
|
|
false -> filter_user_options(Tail, AllowedKeys)
|
|
|
end;
|
|
|
+filter_user_options([_|Tail], AllowedKeys) ->
|
|
|
+ filter_user_options(Tail, AllowedKeys);
|
|
|
filter_user_options([], _) ->
|
|
|
[].
|
|
|
|