gpt4 book ai didi

apache - Access-Control-Allow-Headers 不允许请求头字段 Range

转载 作者:行者123 更新时间:2023-12-02 09:00:08 26 4
gpt4 key购买 nike

我尝试使用 HLS JS 获取视频,但收到以下错误:

XMLHttpRequest cannot load http://example.com/video.ts. Request header field Range is not allowed by Access-Control-Allow-Headers in preflight response.

我正在使用 Apache 配置:

Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "OPTIONS, HEAD, GET, POST, PUT, DELETE"
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Key, Content-Length, Authorization"


AddType video/webm .webm
AddType video/mp4 .mp4
AddType video/ogg .ogv
AddType application/x-mpegurl .m3u8

# hls transport stream segments:
AddType video/mp2t .ts
# subtitle text tracks:
AddType text/vtt .vtt

我用谷歌搜索了一下,我想知道我应该删除/添加哪些 header ?

谢谢

最佳答案

我刚刚添加

Header set Access-Control-Allow-Headers "Range"

关于apache - Access-Control-Allow-Headers 不允许请求头字段 Range,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35707043/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com