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

Content encoding #604

Closed
wants to merge 11 commits into from
Closed

Content encoding #604

wants to merge 11 commits into from

Conversation

orcutt989
Copy link
Contributor

@orcutt989 orcutt989 commented Sep 21, 2023

⚠️ Based on #602

This enables the content-encoding header on all uploaded artifacts to S3. This will not compress the file at rest, but rather on transfer to the client from S3. This will save on bandwidth costs.

See the section on content-encoding in the Digital Ocean docs for more information.

The CDN endpoints may dynamically uncompress content if the origin object has Content-Encoding: gzip and the client does not send Accept-Encoding: gzip. If dynamically uncompressed, the resulting response has the Content-Encoding: gzip header removed.

Most clients will automatically switch to using the compressed data such as web-browsers, but I am unsure about curl. It seems like you'd need to use the --compressed flag to tell curl to uncompress the data.

For some reason with the Chrome browser I got a "network error" when compress was not in the encodings list so I just added all of them for safety.

@orcutt989 orcutt989 closed this Sep 21, 2023
@orcutt989 orcutt989 deleted the content-encoding branch September 21, 2023 19:13
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 this pull request may close these issues.

1 participant