I host my static site on google cloud storage.
My files without gzip compression make my site work perfectly.
When I gzip my files locally (with gzip -r folder
) prior to upload to my cloud storage bucket and run following command, my whole site breaks (images, js, css, all broken - no style information found warning etc.)
gsutil -m -h content-encoding:gzip rsync -c -r ~/my-gzipped-folder gs://example.com
Why the error and how to fix?
decompressive transcoding
is enabled somehow and that causes my site to break. To prevent/disable the transcoding I usedgsutil setmeta -h cache-control:no-transform gs://example.com/*
(right after my aboversync
code with thecontent-encoding:gzip
) but thesetmeta
command did not work, it did nothing. – user10698660