Add CORS header to Lighttpd config.

pull/256/head
Joe Prochazka 2016-09-29 09:54:38 -04:00 zatwierdzone przez GitHub
rodzic a43af5ad1c
commit 046255b72e
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -386,6 +386,11 @@ alias.url += (
url.redirect += (
"^/dump1090$" => "/dump1090/"
)
# Add CORS header
server.modules += ( "mod_setenv" )
$HTTP["url"] =~ "^/dump1090/data/.*\.json$" {
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}
EOF
fi
sudo tee -a /etc/lighttpd/conf-available/89-adsb-portal.conf > /dev/null <<EOF