On this non-FastCGI host Grav's shutdown early-connection-close can't fastcgi_finish_request(), so it emits 'Content-Encoding: identity' to ask the webserver not to compress — but Apache mod_deflate compresses anyway and adds 'Content-Encoding: gzip'. Two conflicting headers => browsers render raw gzip bytes (garbage page). Surfaced when prod flipped to debug:false today (activated Grav's full output path). Fix in the prod env override: debugger.shutdown.close_connection:false skips the identity-header path so mod_deflate compresses cleanly (single header). Verified: one 'content-encoding: gzip', page renders correctly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
39 lines
1.7 KiB
YAML
39 lines
1.7 KiB
YAML
# Production-only Grav config overrides.
|
|
#
|
|
# Deep-merged OVER the committed user/config/system.yaml via Grav's
|
|
# per-environment config mechanism: on the server this file is deployed to
|
|
# <webroot>/user/env/<hostname>/config/system.yaml
|
|
# and Grav's `environment://config` stream (keyed on the request hostname)
|
|
# layers it on top of `user://config`.
|
|
#
|
|
# These values are deliberately NOT in the committed system.yaml because they
|
|
# would break local development (see CLAUDE.md §1 — dev keeps twig.cache:false
|
|
# so theme edits take effect immediately). Prod is the only place they apply.
|
|
#
|
|
# Deploy with: make remote-apply-env-prod
|
|
# The user/env/ tree is outside the content repo's tracked folders, so it is
|
|
# NOT restored by content-push / git-sync / remote-fetch-content — re-run the
|
|
# target above after any fresh install.
|
|
twig:
|
|
cache: true
|
|
debug: false
|
|
auto_reload: false
|
|
|
|
# Compression / connection handling.
|
|
#
|
|
# This host is not FastCGI (no fastcgi_finish_request()), so Grav's shutdown
|
|
# "early connection close" falls back to emitting `Content-Encoding: identity`
|
|
# to ask the webserver not to compress. But Apache's mod_deflate compresses
|
|
# anyway and adds `Content-Encoding: gzip`, giving TWO conflicting headers —
|
|
# the browser can't decode the body and renders raw gzip bytes (a garbage
|
|
# page). Note: allow_webserver_gzip:true takes the SAME identity branch, so it
|
|
# does not help. The real fix is to disable the early-close path, so Grav never
|
|
# emits the bogus header and mod_deflate compresses cleanly (single header).
|
|
debugger:
|
|
shutdown:
|
|
close_connection: false
|
|
# Let the webserver own gzip; Grav does not compress or double-label.
|
|
cache:
|
|
gzip: false
|
|
allow_webserver_gzip: false
|