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

API should send Vary: Accept-Language header #528

Open
russss opened this issue Feb 20, 2025 · 4 comments
Open

API should send Vary: Accept-Language header #528

russss opened this issue Feb 20, 2025 · 4 comments
Labels
bug python Pull requests that update Python code

Comments

@russss
Copy link

russss commented Feb 20, 2025

As the API sends cache headers and uses Accept-Language to determine which language to return, it should send the Vary: Accept-Language response header to stop the incorrect language being returned from the cache.

@russss
Copy link
Author

russss commented Feb 20, 2025

Wait, this should be in osmose-frontend shouldn't it... I think you can move it.

@frodrigo frodrigo transferred this issue from osm-fr/osmose-backend Feb 21, 2025
@frodrigo
Copy link
Member

I not sure how to do this with the fastAPI framework.

We should add this header in the response for all routes using the parameter langs: LangsNegociation = Depends(langs.langs).

@frodrigo frodrigo added bug python Pull requests that update Python code labels Feb 21, 2025
@jocelynj
Copy link
Member

jocelynj commented Feb 21, 2025

Could we add this header with Apache?

For example, we are adding Cache-Control "public, immutable" according to https://github.com/osm-fr/osmose-frontend/blob/master/apache-site

@frodrigo
Copy link
Member

Could we had this header with Apache?

I don't think so. Apache need it to know how to cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

3 participants