sintoniza/nginx-site-default.conf

38 lines
773 B
Plaintext
Raw Normal View History

2023-05-06 22:32:09 +02:00
server {
listen 8080 default_server;
root /var/www/html/;
index index.html;
server_name _;
access_log off;
location / {
try_files $uri $uri/ =404;
}
location /canal {
# Disable cache
add_header Cache-Control no-cache;
# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';
# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
}
}