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

No request cookies are sent when setting src to a URL #633

Open
nsadeh opened this issue Jul 31, 2024 · 0 comments · May be fixed by bvibber/stream-file#18
Open

No request cookies are sent when setting src to a URL #633

nsadeh opened this issue Jul 31, 2024 · 0 comments · May be fixed by bvibber/stream-file#18

Comments

@nsadeh
Copy link

nsadeh commented Jul 31, 2024

Hello, I am using ogv.js to play .ogg files in a web application. My web application uses cookies for session-based user auth, and the audio files are gated behind an auth middleware on the server requiring request cookies.

When I define my audio element as

let audio = document.createElement('audio')
audio.src = "https://my_backend/play_file"

The file is streamed correctly (and plays on non-Safari browsers). In the network tab, I see the correct cookies in the request.

When I define my audio element as

let audio = new OGVPlayer()
audio.src = "https://my_backend/play_file"

request to the backend fails with error 403 (which is what my server returns for a request that fails auth), and in the request tab I see no cookies.

@nsadeh nsadeh linked a pull request Jul 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant