#视频资源地址
location /video/ {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
#添加文件后缀
if (!-e $request_filename){
rewrite ^(.*)$ /$1.mp4 break;
}
root C:/resources;#视频保存的目录
mp4;
mp4_buffer_size 1m;#处理mp4初始内存大小
mp4_max_buffer_size 50m;#处理mp4最大内存大小
}
标签:Control,视频,header,mp4,Access,Nginx,地址,add,Allow
From: https://www.cnblogs.com/blissrabbit/p/17982764