No, I was referring to the route-ordering bug where ordering a directive’s handler based on its path matcher length was wrong. We fixed that.
Also, the example in the docs are correct, it turns out. So, I was wrong about that.
Just so you know, the reverse proxy appends headers from the backend, it doesn’t replace them. Header operations on the response are applied immediately, unless explicitly deferred until later: Modules - Caddy Documentation
If true, header operations will be deferred until they are written out. Superceded if Require is set. Usually you will need to set this to true if any fields are being deleted.
So if you have a header
directive like above, it will set the Cache-Control header right away, then the reverse proxy will append the one from the backend. That’s why the reverse proxy has its own header controls, so you can manipulate headers to/from the backend independently of to/from the client.