Add custom headers to caddy based on mime

I need to set a header for my CDN based on mime time.
Eg: s-maxage
For images it should be days,
for other it should be few minutes.

Any ideas? I looked at plugins but no joy.
Cheers,
Vic

Hi @V_C, welcome to the Caddy community.

The http.expires plugin is the closest you’re going to get, I think.

It sets an Expires header, but you could probably layer another Caddy proxy on top to translate that from Expires to any arbitrary header name you like.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.