Caddy: Looks like header directive is broken

Created on 30 Nov 2020  路  3Comments  路  Source: caddyserver/caddy

On current master-branch such configuration fails:

https://caddytest.localhost {
    tls internal
    @staticAssets {
        path /img/*
    }
    header @staticAssets {
        Cache-Control "public, max-age=3600, stale-while-revalidate=86400"
    }
}

The error message: run: adapting config using caddyfile: parsing caddyfile tokens for 'header': Caddyfile:7 - Error during parsing: cannot specify headers in both arguments and block

On v2.2.1 it is OK.

bug

Most helpful comment

Wrote a fix in https://github.com/caddyserver/caddy/pull/3892

Thanks so much for reporting! Glad to catch it before our v2.3 release 馃槃

All 3 comments

Thanks, I can confirm it broke in b0d5c2c8ae076393e7a3ad59ce875027f4c29304. Taking a look.

Wrote a fix in https://github.com/caddyserver/caddy/pull/3892

Thanks so much for reporting! Glad to catch it before our v2.3 release 馃槃

Thank you both! Really appreciate it :) Thanks for using the master branch @dtelyukh !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mschneider82 picture mschneider82  路  3Comments

treviser picture treviser  路  3Comments

crvv picture crvv  路  3Comments

mikolysz picture mikolysz  路  3Comments

wayneashleyberry picture wayneashleyberry  路  3Comments