Replies: 1 comment
-
I don't think it's reasonable to, by default, reject the entire request when a single, nonstandard header contains unexpected input, especially if the header is ignored by the application and server otherwise. That being said, Rocket exposes all of the mechanisms necessary to implement the approach you're suggesting in a variety of ways. In particular, you could write a fairing that rejects all such requests, or a request guard that creates an IP extraction policy of your choosing based on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi 👋
The docs state for
Request::client_ip
that:I'd argue that it makes more sense to return an error if the headers exists but contains an invalid IP address because if the proxy-server sends an invalid IP in this header, something has probably gone very wrong and the request should not be considered valid.
This table should hopefully illustrate what I mean:
Beta Was this translation helpful? Give feedback.
All reactions