Skip to content

Commit

Permalink
[VCL] Allow caching OPTIONS
Browse files Browse the repository at this point in the history
MSDN says this one is not cacheable, but that is in regards to client side caching, so if REST server wants we allow caching of this.
  • Loading branch information
andrerom committed Feb 25, 2019
1 parent 8e5e011 commit c831351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/varnish/vcl/varnish5.vcl
Expand Up @@ -31,8 +31,8 @@ sub vcl_recv {
// Trigger cache purge if needed
call ez_purge;

// Don't cache requests other than GET and HEAD.
if (req.method != "GET" && req.method != "HEAD") {
// Don't cache requests other than GET, HEAD, & OPTIONS (if expiry/cache headers allow)
if (req.method != "GET" && req.method != "HEAD" && req.method != "OPTIONS") {
return (pass);
}

Expand Down

0 comments on commit c831351

Please sign in to comment.