5

I'm trying to get my video with a HLS JS and I'm getting the follow error:

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

I'm using the Apache configuration:

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

I googled a little and i would like to know what headers I should remove/add?

Thank you

1 Answer 1

7

I just added

Header set Access-Control-Allow-Headers "Range"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.