File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,21 @@ For apps on Heroku, you'd run this command
170
170
heroku config:set DJANGO_STATIC_HOST=https://d4663kmspf1sqa.cloudfront.net
171
171
172
172
173
+ Using compression algorithms other than gzip
174
+ ++++++++++++++++++++++++++++++++++++++++++++
175
+
176
+ By default, CloudFront will discard any ``Accept-Encoding `` header browsers include
177
+ in requests, unless the value of the header is gzip. If it is gzip, CloudFront will
178
+ fetch the uncompressed file from the origin, compress it, and return it to the
179
+ requesting browser.
180
+
181
+ To get CloudFront to not do the compression itself as well as serve files compressed
182
+ using other algorithms, such as Brotli, you must configure your distribution to
183
+ `cache based on the Accept-Encoding header `__. You can do this in the ``Behaviours ``
184
+ tab of your distribution.
185
+
186
+ .. __ : https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-custom-origin
187
+
173
188
.. note ::
174
189
175
190
By default your entire site will be accessible via the CloudFront URL. It's
You can’t perform that action at this time.
0 commit comments