Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Feb 9, 2024

Backport of #11472

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove [skip ci] tag

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Copy link
Member

@MichaIng MichaIng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts resolved. CI failure is unrelated.

@MichaIng MichaIng marked this pull request as ready for review February 9, 2024 15:37
Nginx resets all response headers in a location block, if it contains any "add_header" directive. When setting the "Cache-Control" header for static assets, this was originally worked around by using the "expires" directive instead. #8083 however added the "immutable" flag for assets with "v=" query parameter and broke all other response headers for assets that way.

This commit fixes this by re-adding all reponse headers explicitly for those assets. Originally those doubled code was removed thanks to using "expires", but I see no way to have both: the "immutable" flag as well as avoiding doubled headers via "expires" directive.

Additionally, this commit avoids the trailing comma and space in the Cache-Control header for assets without "v=" query parameter and sets the wasm MIME type in a cleaner way.
Signed-off-by: MichaIng <micha@dietpi.com>
@MichaIng MichaIng force-pushed the backport/11472/stable26 branch from 35dcf9d to dd330ff Compare May 2, 2024 10:14
@susnux susnux closed this Sep 14, 2024
@susnux susnux deleted the backport/11472/stable26 branch September 14, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants