Skip to content

Instantly share code, notes, and snippets.

View KlavsKlavsen's full-sized avatar

Klavs Klavsen KlavsKlavsen

View GitHub Profile
@KlavsKlavsen
KlavsKlavsen / gist:fa76b1b40bbb700a3e55a60db6baf08a
Last active September 4, 2017 13:46
varnish - OPTIONS response
View gist:fa76b1b40bbb700a3e55a60db6baf08a
#compose own OPTIONS reponse
vcl_recv {
if (req.method == "OPTIONS") {
return(synth(750, "Options"));
}
}
sub vcl_synth {
if (resp.status == 750) {
#set resp.http.Access-Control-Allow-Origin = "*";