@Austin_Kirsch The plugin probably shouldn’t modify the original request; if the IP override is to be applied in the error chain, then it should be specified in the error handler explicitly. @xnaas says that doing this:
@francislavoie thats my bad! i was in a hurry and didnt fully read through your initial comment.
@matt if I understand correctly that doesnt work because I’m still passing to ServeHTTP which will override anything realip does, regardless of if its wrapped in handle_errors
I’m not sure I understand… Realip updates the RemoteAddr values which gets replaced when the error chain is invoked. Why can’t it replace it again when used within the error chain? Doesn’t it get the new value from a request header?