Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Add Accept-Language header to URL previews requests #3037

@vurpo

Description

@vurpo

Because some webservers decide upon what language to serve their content in by what country the HTTP client is located in (if no language header is present in the request), this can lead to URL previews being in foreign languages for users if their homeserver is located in a foreign country.

For example, vurpo.fi is hosted on OVH and physically located in France, and I get some URL previews (for example Facebook) in French. Back when I hosted my server in Finland, I had the same problem but in Finnish.

The solution would be to add an Accept-Language header to the URL previews request. Webservers use this as a hint for what language it should serve its content in. The simplest way to configure this would just be to have a key in homeserver.yaml decide what language this header should contain (although some people might want to configure this per-user, it's probably not worth the complexity to implement that at this time).

Metadata

Metadata

Assignees

Labels

Z-Help-WantedWe know exactly how to fix this issue, and would be grateful for any contributionz-bug(Deprecated Label)z-p2(Deprecated Label)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions