Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OGVPlayer: Refused to get unsafe header "Content-Range" #139

Open
Mesoptier opened this issue Nov 19, 2022 · 2 comments
Open

OGVPlayer: Refused to get unsafe header "Content-Range" #139

Mesoptier opened this issue Nov 19, 2022 · 2 comments
Assignees
Labels
soundboard-4.0 https://github.com/team-thyme/soundboard/pull/134

Comments

@Mesoptier
Copy link
Member

As the title says, when loading a sample with useOgvFallback enabled, I get this error in my console:

Refused to get unsafe header "Content-Range"

As far as I can tell, this is a CORS-related issue. I might also be the first person to have this issue, since I'm running the soundboard frontend locally but using the production API. I guess that when they're running on the same origin, there's no CORS issues.

I think it could be fixed by adding this header: Access-Control-Expose-Headers: Content-Range.

See also this line in stream-file (the library used by ogv.js): https://github.com/brion/stream-file/blob/d1b41ca2992b908d8910d5389b6a663146d5d5b3/src/backend/backend.js#L30

@Mesoptier Mesoptier added the soundboard-4.0 https://github.com/team-thyme/soundboard/pull/134 label Nov 19, 2022
@Mesoptier
Copy link
Member Author

I labelled it with soundboard-3.0, but just realized that the same issue might exist for the main branch.

@villermen
Copy link
Member

villermen commented Nov 21, 2022

Hmm. I've tested OGV.js plenty from local to real API and on Safari as well and never ran into this somehow. I'll try to reproduce.

Also I have some concerns with the 3.0 tag. I get the reference to editor 3.0, but the soundboard's already passed v3.0 a while ago. Shouldn't it be v4.0? And wouldn't this cause PTSS for you every time you see the tag? =O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
soundboard-4.0 https://github.com/team-thyme/soundboard/pull/134
Projects
None yet
Development

No branches or pull requests

2 participants