From c8313515906625eeb9627d455965219d9409f96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= Date: Mon, 25 Feb 2019 21:04:53 +0100 Subject: [PATCH] [VCL] Allow caching OPTIONS 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. --- docs/varnish/vcl/varnish5.vcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/varnish/vcl/varnish5.vcl b/docs/varnish/vcl/varnish5.vcl index 090d191f..a4d8edee 100644 --- a/docs/varnish/vcl/varnish5.vcl +++ b/docs/varnish/vcl/varnish5.vcl @@ -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); }