Can't Message Users Here, Reaching Out Via Thread

@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:

  handle_errors {
    realip {
      header "X-Forwarded-For"
      from cloudflare
      maxhops 5
    }

doesn’t work as expected. It’s possible there’s a bug in our error handling but I’ll need some help to narrow it down.

@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?

This topic was automatically closed after 30 days. New replies are no longer allowed.