How to enable GZip compression for Gitlab Pages?
caching, compression, gitlab, gzip, http-headers
Solution
- It looks like specifying HTTP Cache Headers is still not possible. But at least they have hardcoded "max-age=600" for all the resources here.
You can compress contents of your public folder via .gitlab-ci.yml:
script:
- npm install
- npm run build
- gzip -k -6 -r public
Problem
When using Gitlab Pages to render my site which is slow in page-ranking. I can't find any solution on how to do following in GitLab (non-enterprise version) Specify `HTTP Cache Headers` for various page resources like for an image, so that it can be cached. Specify/Enable compression for GZip as page-ranking mentions compression disabled in gitlab.io.