How do I customize the HTTP cache header in Gitlab?

When using Gitlab pages to make my site slow in page rank. I can't seem to find a solution on how to do the following in GitLab (non-enterprise version)

  • Specify HTTP Cache Headers

    for various page resources, such as an image, so that it can be cached.

  • Specify / Enable compression for GZip as the page rank mentions that compression is disabled in gitlab.io.

+3


source to share


1 answer


  • It looks like specifying HTTP cache headers is still not possible. But at least they have a hardcoded "max-age = 600" for all resources here .
  • You can compress the contents of your public folder via .gitlab-ci.yml:

    script:

    • npm install
    • npm run build
    • gzip -k -6 -r public


+1


source







All Articles