added cors header

This commit is contained in:
Lukas Schulz 2020-12-01 21:25:29 +01:00
parent bc30682b9e
commit cdaad1a973

View file

@ -10,6 +10,7 @@ in {
virtualHosts."${config.networking.hostName}.live.hacc.media" = { virtualHosts."${config.networking.hostName}.live.hacc.media" = {
locations = { locations = {
"~* \\.(m3u8)$" = { "~* \\.(m3u8)$" = {
add_header 'Access-Control-Allow-Origin' '*';
proxyPass = "${host-server}$request_uri"; proxyPass = "${host-server}$request_uri";
extraConfig = '' extraConfig = ''
#proxy_cache = off; #proxy_cache = off;
@ -18,6 +19,7 @@ in {
''; '';
}; };
"/hls" = { "/hls" = {
add_header 'Access-Control-Allow-Origin' '*';
proxyPass = "${host-server}$request_uri"; proxyPass = "${host-server}$request_uri";
extraConfig = '' extraConfig = ''
types { types {