sillygod/cdp-cache

View on GitHub
cmd/Caddyfile

Summary

Maintainability
Test Coverage
# This is an example caddyfile
{
    # debug
    order http_cache before reverse_proxy
    admin 0.0.0.0:7777

}

:9991  {

    reverse_proxy {
        to localhost:9995
    }

    http_cache {

        cache_type in_memory
        match_path /
        match_header Content-Type image/jpg image/png "text/plain; charset=utf-8" "application/json" ""

    }



    log {
        output file /tmp/logs/caddy/access.log
        format console
        level debug
    }

}

:9995 {
    header Cache-control "public"
    root * /tmp/caddy-benchmark
    file_server

    log {
        level info
    }
}