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

Set correct content-type and cache-control for S3 uploads #2771

Closed
rmens opened this issue Mar 4, 2023 · 2 comments · Fixed by #2830
Closed

Set correct content-type and cache-control for S3 uploads #2771

rmens opened this issue Mar 4, 2023 · 2 comments · Fixed by #2830
Assignees

Comments

@rmens
Copy link

rmens commented Mar 4, 2023

Share your bug report, feature request, or comment.

Bumped into this when figuring out why using Cloudflare R2 isn't working as it should as S3 storage.

For .m3u8 playlists locally served, the headers are set like this:

cache-control: no-cache, no-store, must-revalidate
content-type: application/x-mpegURL

For .m3u8 playlists served over S3, the headers are set like this:

cache-control: max-age=0

And content-type is not set at all. Some S3 providers like Backblaze B2 seem to guess the correct content-type based on the file extension, but not all do. For example Cloudflare R2 doesn't.

The s3manager for Go does support setting these values. I suggest making them universal for playlists and chunks served locally or over S3.

@JacobWrenn
Copy link
Contributor

Hi @gabek please assign me. I will be sure to message you on the chat if I need the testing credentials.

@gabek gabek assigned JacobWrenn and unassigned gabek Mar 11, 2023
@gabek
Copy link
Member

gabek commented Mar 11, 2023

Awesome, thanks!

@JacobWrenn JacobWrenn mentioned this issue Mar 16, 2023
@gabek gabek added this to the v0.1.0 - Web frontend v2 milestone Mar 16, 2023
@gabek gabek linked a pull request Mar 16, 2023 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.

3 participants