Skip to content

[stable24] Fix Cache-Control header of non-versioned assets - #37250

Merged
MichaIng merged 1 commit into
stable24from
backport/37010/stable24
Mar 16, 2023
Merged

[stable24] Fix Cache-Control header of non-versioned assets#37250
MichaIng merged 1 commit into
stable24from
backport/37010/stable24

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

backport of #37010

Non-cache-busted assets such as /dist/core-main.js also matched the
regex meant for cache-busted assets (note the ? at the end of the
regex).
The FilesMatch directive for cache-busted assets coming after the
non-cache-busted version all assets actually got the immutable flag
in their Cache-Control header. This caused client-side errors on
updates.
Query strings are not actually passed to FilesMatch directives so we
need another way to tell cache-busted/versionned assets apart from
non-versioned assets, here using If/Else directives.
Signed-off-by: Nicolas Guichard <nicolas@guichard.eu>
@blizzzblizzz mentioned this pull request Mar 16, 2023
@MichaIng
MichaIng requested a review from solracsfMarch 16, 2023 14:50
@MichaIng
MichaIng enabled auto-merge March 16, 2023 14:50
@MichaIng
MichaIng merged commit 59f4f5c into stable24Mar 16, 2023
@MichaIng
MichaIng deleted the backport/37010/stable24 branch March 16, 2023 16:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@blizzz@MichaIng@nicolas-guichard