Releases: GetPageSpeed/ngx_immutable
v0.0.6
What's New
MIME Type Filtering with immutable_types
Added immutable_types directive to restrict immutable caching headers to specific MIME types. When not specified, immutable headers apply to all content types (backward compatible).
location /static/ {
immutable on;
# Only apply immutable headers to JavaScript and CSS files
immutable_types application/javascript text/css;
}This allows fine-grained control over which content types receive immutable caching headers, similar to how gzip_types works for the gzip module.
Example: Mixed Content Location
location /assets/ {
immutable on;
# Apply immutable headers only to static assets
immutable_types application/javascript text/css image/png image/jpeg image/gif image/svg+xml;
}With this configuration, versioned JavaScript and CSS files get the full immutable caching treatment, while other files (like HTML or JSON) served from the same location don't receive immutable headers.
Full Changelog: v0.0.5...v0.0.6
v0.0.5
What's New
RFC 9211 Cache-Status Header Support
Added immutable_cache_status directive that enables the RFC 9211 Cache-Status header for debugging and observability.
location /static/ {
immutable on;
immutable_cache_status on;
}When enabled, responses include:
Cache-Status: "nginx/immutable"; hit; ttl=31536000
This header helps debug caching behavior across multi-layer caching architectures (NGINX -> CDN -> Browser). Each cache layer can append its own status, creating a chain like:
Cache-Status: "nginx/immutable"; hit; ttl=31536000, "cloudflare"; fwd=uri-miss; stored
Documentation
- Added Directives section to README documenting all configuration options
v0.0.4
Added "stale" directives for better cacheability
v0.0.3
Fix uninitialized compiler error warning
v0.0.2
Compatibility with NGINX 1.23.0 where headers structure changed for Cache-Control, etc.
v0.0.1
First release