@@ -297,6 +297,9 @@ lower(C) -> C.
297297 Result :: boolean ().
298298is_trusted_proxy (Peer ) ->
299299 case application :get_env (cowmachine , proxy_allowlist ) of
300+ {ok , ip_whitelist } ->
301+ % Map old config name
302+ is_trusted_proxy (ip_allowlist , Peer );
300303 {ok , ProxyAllowlist } ->
301304 is_trusted_proxy (ProxyAllowlist , Peer );
302305 undefined ->
@@ -305,7 +308,7 @@ is_trusted_proxy(Peer) ->
305308
306309-spec is_trusted_proxy (Marker , Peer ) -> Result when
307310 Marker :: ProxyMarker | ProxyAllowlist ,
308- ProxyMarker :: any | ip_whitelist | local | none ,
311+ ProxyMarker :: any | ip_allowlist | local | none ,
309312 ProxyAllowlist :: list () | binary (),
310313 Peer :: inet :ip_address (),
311314 Result :: boolean ().
@@ -315,7 +318,7 @@ is_trusted_proxy(any, _Peer) ->
315318 true ;
316319is_trusted_proxy (local , Peer ) ->
317320 z_ip_address :is_local (Peer );
318- is_trusted_proxy (ip_whitelist , Peer ) ->
321+ is_trusted_proxy (ip_allowlist , Peer ) ->
319322 case application :get_env (cowmachine , ip_allowlist ) of
320323 {ok , Allowlist } ->
321324 z_ip_address :ip_match (Peer , Allowlist );
0 commit comments