Piped-Docker icon indicating copy to clipboard operation
Piped-Docker copied to clipboard

Replace varnish with Caddy's cache directive

Open FireMasterK opened this issue 3 years ago • 4 comments

Or alternatively, haproxy.

FireMasterK avatar Jan 08 '22 22:01 FireMasterK

Or, or: https://sr.ht/~emersion/tlstunnel/

kubo6472 avatar Jul 28 '22 18:07 kubo6472

Partially complete with https://github.com/TeamPiped/Piped-Docker/commit/2480d0dffbe2be69c51faf023332f4b00c92fd7d, Caddy is still left.

We should use the inbuilt cache directive: https://github.com/caddyserver/cache-handler

FireMasterK avatar Aug 07 '22 01:08 FireMasterK

{
    order cache before rewrite
    cache
}

example.com {
    cache {
      stale 10s
      ttl 10s
    }
    reverse_proxy your-app:8080
}

This is what I've managed to splice together based on that doc you linked. No idea if it works as you want it to, but I think this is the way.

kubo6472 avatar Feb 28 '23 22:02 kubo6472

Is it built by default? If not, I think a xcaddy build to use this

FireMasterK avatar Feb 28 '23 22:02 FireMasterK