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

Don't generate a Content-Location on GET responses #6750

Open
dunglas opened this issue Oct 24, 2024 · 2 comments
Open

Don't generate a Content-Location on GET responses #6750

dunglas opened this issue Oct 24, 2024 · 2 comments

Comments

@dunglas
Copy link
Member

dunglas commented Oct 24, 2024

Currently, API Platform adds a Content-Location header on responses to GET requests that has the exact same value as the requested URL.
While this is valid (https://httpwg.org/specs/rfc9110.html#field.content-location), this is useless and can cause weird issues, for instance when the serialized resource doesn't contain an ID (temporarily response, preview...).

We should not generate this header for responses to GET requests.

@dunglas dunglas changed the title DOn't generate a Content-Location on GET responses Don't generate a Content-Location on GET responses Oct 24, 2024
@soyuka
Copy link
Member

soyuka commented Oct 26, 2024

mhh but #6627 and #6625 ping @darkweak

@darkweak
Copy link
Contributor

You can rollback IMHO @soyuka, I'll find another way to get the location on list. Thank you for implementing this for this short time. 😄

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

No branches or pull requests

3 participants