本文介绍一款修复版本的M3U8视频资源去广告json解析接口源码,支持IP授权以防止盗用,需填写服务器IP并支持多个IP。使用宝塔时需设置跨域访问和伪静态,并提供具体设置方法。调用方法为域名/?url=,示例链接为http://www.xxx.com/m3u8/?url=。注意填写APP链接特征为.m3u8,其他APP理论上相同。
<p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">location / {</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">if ( $request_method = ‘OPTIONS’ ) {</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">add_header access-control-allow-headers range;</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">add_header access-control-allow-methods GET,POST,HEAD,OPTIONS;</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">add_header access-control-allow-origin *;</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">return 200;</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">}</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">add_header access-control-allow-origin *;</p><p style="box-sizing: inherit; margin-bottom: 20px; line-height: 1.8; color: rgb(85, 85, 85); font-family: two; font-size: 15px;">}</p>
笔墨有情,赞赏留香
您的支持是我们创作的最大动力














![表情[xieyanxiao]轩玮博客-探索建站技术,分享专业见解IT博客轩玮博客](https://www.xuwbk.com/wp-content/themes/zibll/img/smilies/xieyanxiao.gif)


暂无评论内容