It’s true, I don’t need to rebuild the config. The reason I suggested to is because I want to leverage other Caddy modules.
If I have my own middleware I could handle most logic by myself, but I definitely don’t want to do my own reverse proxy, for example. So how would I go around that?
Am I allowed to / supposed to caddy.GetModule("http.handlers.reverse_proxy").New()
, provision it and then ServeHTTP()
it by myself inside my middleware?
This could work well, since my only real conditional is “do we call the reverse proxy or not for this”.
WDYT?