GZIP migration from v1 to v2

I have a caddy v1 to caddy v2 upgrade question.

I have this in V1 caddyfile.

gzip {
        not /api/stream/

I have seen it is now encoding gzip, but how do I do the not part?

Check out the upgrade guide!

To exclude certain requests, read up on request matchers:

I checked the upgrade guide and saw the matching thing, but I am not entirely sure how to utilize it properly. Is there any examples that shows more in-depth? But yes this is what I am looking for.

You’re looking to define a named matcher block, then you’ll configure it with a not matcher which will invert the path matcher.

This topic was automatically closed after 30 days. New replies are no longer allowed.