当您请求的 URL 是 https 协议时,Nginx 可以通过以下配置将其转换为 http 协议:

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate /path/to/ssl/certificate.crt;
    ssl_certificate_key /path/to/ssl/certificate.key;

    # Redirect all HTTPS requests to HTTP
    if ($scheme = https) {
        return 301 http://$server_name$request_uri;
    }

    # Serve m3u8 files
    location /path/to/m3u8 {
        # Your m3u8 configuration goes here
    }
}

在上面的配置中,当 HTTPS 请求到达时,将使用 if 块将其转换为 HTTP 请求。然后,您可以在 location 块中配置任何针对 .m3u8 文件的配置。

nginx config https 转 http 访问 m3u8

原文地址: http://www.cveoy.top/t/topic/brK2 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录