0

I'm using CloudFront with an origin server (not S3).

How could I get my rails app to server Gzip versions of JS and CSS in this case?

1 Answer 1

3

CF will serve gzipped content if your origin server provides gzipped content, so you need to see if you get gzipped content from your origin server, which depends on which backend server you're using.

One thing I recently noticed was that nginx doesn't by default serve gzipped data if the request uses HTTP 1.0, which CF does. There's an nginx directive, gzip_http_version, that can be used to allow it.

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.