Add a CORS header to data json files.

This commit is contained in:
Oliver Jowett 2016-07-10 15:26:44 +01:00
parent 1cb3e81989
commit de94839339

View file

@ -19,3 +19,9 @@ $SERVER["socket"] == ":8080" {
url.redirect = ("^/(.*)" => "http://%1/dump1090-fa/$1") url.redirect = ("^/(.*)" => "http://%1/dump1090-fa/$1")
} }
} }
# Add CORS header
server.modules += ( "mod_setenv" )
$HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}