Hello - I hope you’ll excuse my non-use of the help template, but this is more of a general question.
I’d like to port this Caddyfile from v1 to v2, but haven’t found an equivalent to the http.internal directive that it uses:
fastcgi / app:9000 php
With the introduction of reverse_proxy’s “handle_response” function in v2.1, is it now possible to have Caddy 2.1.x look for an “X-Accel-Redirect” header in order to allow selectively bypassing a PHP fastcgi router and serving a static resource directly from a cache folder instead?
This is used by TT-RSS, a popular ttrss reader that is bundling caddy (currently, caddy v1) as part of a docker-compose bundle; the lead dev is insisting we hold off on a switch to v2 until there’s X-Accel-Redirect / sendfile support. Apparently something like try_files won’t do: https://community.tt-rss.org/t/docker-compose-tt-rss/2894/220?u=6v4fvnzm
Mholt’s comment here suggests it should be doable, but I’m afraid I’m too much of a newb to figure this one out. I think there are enough people migrating over from nginx that they’d welcome an example of how to use this new feature specifically with X-Accel-Redirect headers!