getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[site-toolbox] warm-cache plugin incompatible with gzipped sitemap #351

Closed thomastweets closed 1 year ago

thomastweets commented 1 year ago

We host our website with Caddy using a encode zstd gzip directive (https://caddyserver.com/docs/caddyfile/directives/encode) to ensure efficient content delivery. This does affect the content-type for our sitemap.json which becomes application/json; charset=utf-8 instead of application/json as expected by the check in line 182 of user/plugins/warm-cache/warm-cache.php:

$sitemap_response->getHeaders()['content-type'][0] == 'application/json')

This results in the warm-cache plugin throwing an error. When removing the check above the warm-cache command works fine. We can fix this locally, however, an upstream change would be nice.

Thanks!

rhukster commented 1 year ago

no problem, i can fix that. cheers.

rhukster commented 1 year ago

released 2.0.3 wiith a fix

thomastweets commented 1 year ago

Thanks a lot @rhukster, that was FAST! I can confirm that it is working for us. 👍