Cloudfront Compress Objects Automatically

(Drew Friestedt) #1

I’m working through google pagespeed items.

Google is telling me I need to enable compression:
“Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.”

Is there any reason I should NOT enable compression on cloudfront by selecting YES to Compress Objects Automatically?

I read here on the forum that compression should be handled elsewhere, but I have not changed any settings that would impact built in compression handled by Discourse.

I’m updating this with additional research. I did find this post that is pretty much the same issue:

I tested if my js assets are getting compressed by going here as recommended:

I tested an asset and it came back as uncompressed:

I’m also seeing this in the headers of assets served from the CDN:
x-cache:Miss from cloudfront

I’m using the std docker installation with no modifications, proxy, or anything in front of the docker. I’m only using cloudfront for the CDN.