Hacker News new | ask | show | jobs
by stp-ip 3615 days ago
No plugin for only caching headers, but you can do that easily using the headers plugin or headers_downstream within the proxy plugin.

As an example:

      header / Cache-Control "no-cache, max-age=86400"

      header /images/ Cache-Control "max-age=86400"

      header /css/ Cache-Control "max-age=604800"

      header /fonts/ Cache-Control "max-age=604800"

      header /icons/ Cache-Control "max-age=604800"
If you want to add the header only to static assets that can be done, but is a bit harder.