add_cors_headers.vcl 422 B

1234567
  1. # Set CORS headers only if client sends the Origin Header and only if we are executing on the edge
  2. if ( fastly.ff.visits_this_service == 0 && req.http.Origin ) {
  3. set resp.http.Access-Control-Allow-Origin = "*";
  4. set resp.http.Access-Control-Allow-Methods = "GET";
  5. set resp.http.Access-Control-Allow-Headers = "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type";
  6. }