element-hq / element-hq/element-web

Send `Referer` header for map tile requests

Open
#22,927 1 comment 0 reactions 0 assignees View on GitHub
A-Location-Sharing O-Uncommon S-Tolerable T-Enhancement Z-Labs
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

Hey folks,

stellar work so far, love to see the matrix ecosystem grow and grow :+1:

I have a feature requests wrt the new location features:

#### What would you like to do?

Use a custom tile server on a custom instance of Element. This can be done, but Element doesn't include `Referer` information in requests it performs against the tile server. It would be good to include the `Referer` header in those requests, or at least an option for it.

#### Why would you like to do it?

A typical custom tile server is just a cache for an upstream openstreemap tile server. In the simplest case, it just caches HTTP responses from there. In this case, it has to adhere to the upstream policies, one of which is to include `Referer` info for all requests:

https://github.com/openstreetmap/owg-website/blob/90513ab366d46ab499ea8b1abbe6c001261b3c02/policies/tiles.md

On top of that, I imagine most folks don't want to run an open caching service. The ability to filter requests by an allowlist of referer domains would be helpful in that regard as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.