HTTP modules

Common configuration that applies to all modules with HTTP support.

Cache-Control

Cache-Control headers for static resources are configured per module via the cache_control property. Without configuration, the default behavior applies.

Default behavior: All directory requests (index pages) get no-store, no-transform, max-age=0.

circle-exclamation

Configuration

Cache-control for static resources are controlled by policys. A policy maps an URL pattern to a Cache-Control header value. Pattern are globs supporting wildcards etc.

Policies are evaluated in order — first match wins.

"cache_control": {
    "policies": [
      { "pattern": "**/*.js",  "value": "public, max-age=31536000, immutable" },
      { "pattern": "**/*.css", "value": "public, max-age=31536000, immutable" },
      { "pattern": "**/",      "value": "no-store, no-transform, max-age=0" }
    ]
  }

Policy fields

Glob syntax

Last updated