You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the name TrustedProxyFilter is subtly inaccurate. A filter is something that takes a list, and returns a sublist (the filtered list) back.
In contrast, this (via the call method) takes a single IP and tells you if it's valid. It's essentially a big configurable function whose input is an IP and whose output is a boolean value. What would you name such a function?
Probably something like valid_ip?. However, since this is a class name (which can't end in ?) I'd consider something like class IsIpValid or class IsIpTrusted.
(copied over on behalf of Jonah):
I think the name
TrustedProxyFilter
is subtly inaccurate. A filter is something that takes a list, and returns a sublist (the filtered list) back.In contrast, this (via the
call
method) takes a single IP and tells you if it's valid. It's essentially a big configurable function whose input is an IP and whose output is a boolean value. What would you name such a function?Probably something like
valid_ip?
. However, since this is a class name (which can't end in?
) I'd consider something likeclass IsIpValid
orclass IsIpTrusted
.In client code:
The text was updated successfully, but these errors were encountered: