Skip to content

Instantly share code, notes, and snippets.

@jelder
Created July 28, 2010 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jelder/494302 to your computer and use it in GitHub Desktop.
Save jelder/494302 to your computer and use it in GitHub Desktop.
sub vcl_recv {
if (req.url == "/crossdomain.xml") {
error 843 "OK";
}
/* ... */
}
sub vcl_error {
if (obj.status == 843) {
set obj.status = 200;
set obj.http.Content-Type = "application/xml; charset=utf-8";
set obj.http.Cache-Control = "max-age=2592000";
remove obj.http.Retry-After;
synthetic {"<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
<site-control permitted-cross-domain-policies="all" />
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
"};
deliver;
}
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment