test fail for .ts files
This commit is contained in:
parent
555fee9b49
commit
381c622915
|
|
@ -2,55 +2,86 @@ server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:80 default_server;
|
listen [::]:80 default_server;
|
||||||
|
|
||||||
root /var/www/html;
|
|
||||||
index index.html index.htm index.nginx-debian.html;
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
# CORS (required for video players)
|
root /var/www/html;
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
index index.html index.htm;
|
||||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
|
||||||
add_header Access-Control-Allow-Headers "*" always;
|
|
||||||
|
|
||||||
# Handle OPTIONS requests
|
# Performance
|
||||||
if ($request_method = OPTIONS) {
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Global CORS
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
add_header Access-Control-Allow-Origin "*" always;
|
||||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
||||||
|
add_header Access-Control-Allow-Headers "*" always;
|
||||||
|
add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
|
||||||
|
|
||||||
|
# OPTIONS requests
|
||||||
|
location / {
|
||||||
|
if ($request_method = OPTIONS) {
|
||||||
return 204;
|
return 204;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Default static
|
autoindex on;
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# HLS streaming
|
# =========================
|
||||||
|
# HLS
|
||||||
|
# =========================
|
||||||
location /hls/ {
|
location /hls/ {
|
||||||
|
|
||||||
types {
|
types {
|
||||||
application/vnd.apple.mpegurl m3u8;
|
application/vnd.apple.mpegurl m3u8;
|
||||||
video/mp2t ts;
|
video/mp2t ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
try_files $uri =404;
|
add_header Cache-Control "no-cache";
|
||||||
|
add_header Accept-Ranges bytes;
|
||||||
add_header Cache-Control no-cache;
|
|
||||||
add_header Content-Disposition inline;
|
add_header Content-Disposition inline;
|
||||||
|
|
||||||
|
gzip off;
|
||||||
|
|
||||||
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# DASH streaming
|
# =========================
|
||||||
|
# DASH
|
||||||
|
# =========================
|
||||||
location /dash/ {
|
location /dash/ {
|
||||||
|
|
||||||
types {
|
types {
|
||||||
application/dash+xml mpd;
|
application/dash+xml mpd;
|
||||||
video/mp4 mp4 m4s;
|
video/mp4 mp4 m4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
try_files $uri =404;
|
add_header Cache-Control "no-cache";
|
||||||
|
add_header Accept-Ranges bytes;
|
||||||
add_header Cache-Control no-cache;
|
|
||||||
add_header Content-Disposition inline;
|
add_header Content-Disposition inline;
|
||||||
|
|
||||||
|
gzip off;
|
||||||
|
|
||||||
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Block .htaccess
|
# gzip only manifests
|
||||||
location ~ /\.ht {
|
location ~* \.(m3u8|mpd)$ {
|
||||||
deny all;
|
gzip on;
|
||||||
|
gzip_types application/vnd.apple.mpegurl application/dash+xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Security
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
}
|
}
|
||||||
|
|
@ -9,7 +9,7 @@ https://github.com/shreebhattji/Urmi/blob/main/licence.md
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exec("sudo chmod 444 /sys/class/dmi/id/product_uuid");
|
exec("sudo chmod 444 /sys/class/dmi/id/product_uuid");
|
||||||
$version = "12.22";
|
$version = "12.23";
|
||||||
|
|
||||||
function fail(string $msg): never
|
function fail(string $msg): never
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue