Problem/Motivation

Using current default.vcl configuration proided with this module, those files (woff2, svg & webp) won't be cached by Varnish.

Steps to reproduce

Observing the HTTP header of webp, svg or woff2 files you will see x-varnish-cache: MISS

Proposed resolution

Update provided default.vcl file.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tostinni created an issue. See original summary.

tostinni’s picture

Status: Active » Needs review

Switch to need review.

shumer’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

arnaud-brugnon’s picture

I am sorry to say that but the fix is not complete.

As the default.vcl comments, modifications in line 125 must be in line 224 too

Otherwise, svg elements will be not be cached (Debugging since few hours ...)

So

if (bereq.url ~ "(?i)\.(jpeg|jpg|png|gif|ico|swf|js|css|txt|eot|woff|ttf|htc|mp3|m4a|mp4|m4v|mov|mpeg|mpg|avi|divx|ogg|ogv|wma|pdf|tar|gz|gzip|bz2|asc|dat|doc|xls|ppt|tgz|csv)(\?.*|)$") {
unset beresp.http.set-cookie;
return(deliver);
}

Shoud containts new formats

arnaud-brugnon’s picture

It may be a good idea to set variables to thoses list to prevent duplicate errors

arnaud-brugnon’s picture

Or maybe we can do like Search API module.

Make default.vcl downloadable in back office

shumer’s picture

Status: Closed (fixed) » Active

  • shumer committed 1392dc1 on 4.x
    Issue #3241704 by tostinni: Add new static files formats (woff2, svg...
shumer’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.