Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Do not overwrite existing link header(s) in AddLinkHeadersForPreloadedAssets middleware #53463

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

jnoordsij
Copy link
Contributor

@jnoordsij jnoordsij commented Nov 10, 2024

When looking into adding some manual Link headers for some static assets, I noticed I could not manage to add any when the AddLinkHeadersForPreloadedAssets is active. This PR alters the behavior to not overwrite the Link header, but rather add to it. This ensures developers have the opportunity to also add Link headers of their own within the scope of their application logic.

I also reversed an expected vs. actual ordering in an existing test.

@jnoordsij jnoordsij changed the title [11.x] Do not overwrite existing link header(s) in AddLinkHeadersForPreloadedAssets [11.x] Do not overwrite existing link header(s) in AddLinkHeadersForPreloadedAssets middleware Nov 10, 2024
@taylorotwell taylorotwell merged commit 378bd56 into laravel:11.x Nov 11, 2024
33 checks passed
@jnoordsij jnoordsij deleted the do-not-overwrite-link-headers branch November 11, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants