Skip to content

Instantly share code, notes, and snippets.

@oralunal
Forked from derekclee/default.vcl
Created January 9, 2017 21:15
Show Gist options
  • Save oralunal/64dc6ba730d868e125401ae367ab28dd to your computer and use it in GitHub Desktop.
Save oralunal/64dc6ba730d868e125401ae367ab28dd to your computer and use it in GitHub Desktop.
Varnish Cache Set CORS headers
sub vcl_deliver {
if (req.url ~ "/fonts/") {
set resp.http.Access-Control-Allow-Origin = "*";
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS";
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment