# Every *.js/*.css under views/ - front-office checkout bundles and back-office config assets
# alike - was served with a 7-day Cache-Control by the host's default static-file rules, with no
# cache-busting query string on the URL. A browser that already loaded either surface kept an old
# bundle for up to a week after any cut/hotfix, invisible to a normal reload.
#
# A query-string cache-buster (?v=<version>) was tried and reverted on the legacy Presta module:
# registerJavascript()/registerStylesheet() with 'server' => 'local' resolve the asset
# by running the exact URI through file_exists() (PrestaShop\PrestaShop\Adapter\Assets\
# AssetUrlGeneratorTrait::getPathFromUri() does not strip the query string), so a versioned URI
# never matches a real file and the asset silently fails to register - no exception, the module's
# JS/CSS (and the whole payment option) just disappears from checkout. This header is the only
# safe fix: must-revalidate keeps ETag/Last-Modified-based 304 responses cheap - it does not
# disable caching, only blind reuse of a stale copy, without touching how assets are registered.
#
# Requires AllowOverride to include FileInfo (or All) for this directory - without it, Apache
# rejects the Header directive outright instead of silently ignoring it.
<IfModule mod_headers.c>
    <FilesMatch "\.(js|css)$">
        Header always set Cache-Control "no-cache, must-revalidate"
    </FilesMatch>
</IfModule>
