Returning HTTP 204 for OPTIONS requests

Andrew Langhorn andrew.langhorn at digital.cabinet-office.gov.uk
Wed Sep 16 13:36:36 CEST 2015


Hello,

I run Varnish in front of a stack that doesn't respond to OPTIONS requests.
I'd like to filter out these requests from our error logs, because
currently they respond with a 404, which means there's quite a lot of noise.

I've been using this snippet at the top of vcl_recv:

if (req.request == "OPTIONS") {

error 204 "No Content";

}


Is that the best place for it, or are there better places instead?
Similarly, is that the best way of doing this?

Thanks,

-- 
Andrew Langhorn
Web Operations
Government Digital Service

e: andrew.langhorn at digital.cabinet-office.gov.uk
a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150916/8e7d3dea/attachment.html>


More information about the varnish-misc mailing list