repositioned second CORS header

keep-around/77ed77aa9358096e4bbd7f8d7fda0ffcfcc67334
Lukas Schulz 2020-12-01 21:33:13 +01:00
parent fe01c721a6
commit 77ed77aa93
1 changed files with 3 additions and 2 deletions

View File

@ -10,12 +10,13 @@ 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;
expires 2s; expires 2s;
auth_basic off; auth_basic off;
add_header 'Access-Control-Allow-Origin' '*';
''; '';
}; };
"/hls" = { "/hls" = {
@ -30,7 +31,7 @@ in {
proxy_ignore_headers Cache-Control; proxy_ignore_headers Cache-Control;
proxy_cache_valid any 30m; proxy_cache_valid any 30m;
auth_basic off; auth_basic off;
add_header \'Access-Control-Allow-Origin\' \'*\'; add_header 'Access-Control-Allow-Origin' '*';
''; '';
}; };
}; };