<div dir="ltr">Hello,<div><br></div><div>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.</div><div><br></div><div>I've been using this snippet at the top of vcl_recv:</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace, monospace">if (req.request == "OPTIONS") {</font></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace, monospace">error 204 "No Content";</font></div></blockquote></div></blockquote><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace, monospace">}</font></div></blockquote><div><br></div><div>Is that the best place for it, or are there better places instead? Similarly, is that the best way of doing this?</div><div><br></div><div>Thanks,</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Andrew Langhorn<br></div><div>Web Operations</div><div>Government Digital Service</div><div><br></div><div>e: <a href="mailto:andrew.langhorn@digital.cabinet-office.gov.uk" target="_blank">andrew.langhorn@digital.cabinet-office.gov.uk</a></div><div>a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH</div></div></div></div></div>
</div></div>