Skip to content

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