diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 4b7ac043..d5c64ecd 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -48,21 +48,21 @@ server { {{ $cors_headers_get }} } - # Custom location block for /connect - # location /connect/ { - # proxy_pass http://presence-8080/; - # {{ $proxy_settings }} - # {{ $gzip_settings }} - # {{ $cors_headers_options }} - # {{ $cors_headers_post }} - # {{ $cors_headers_get }} - # } - location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { expires 30d; # This means that the client can cache these resources for 30 days. add_header Cache-Control "public, no-transform"; } + location ~* \.(mp3)$ { + if ($request_method = 'GET') { + add_header 'Access-Control-Allow-Origin' $allow_origin always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always; + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always; + add_header 'Access-Control-Allow-Credentials' 'true' always; + } + } + error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html; location /400-error.html { @@ -88,7 +88,6 @@ server { internal; } - # include /home/dokku/gateway/nginx.conf.d/*.conf; include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf; } {{ end }}