Referer header /CORS on outgoing HTTP requests is missing

Hi team,

The problem
When trying to fetch OSM raster tiles directly from tile.openstreetmap.org, the requests get blocked. The OSM tile servers enforce a Referer/User-Agent policy — requests that arrive without a valid HTTP Referer header, or with an unrecognized one, are rejected with a 403.

It seems like that Coherent GT strips or doesn’t send a proper Referer header on outgoing HTTP requests.

Why not fetch directly from Coherent GT?
Coherent GT does not expose a way to inject custom HTTP headers on fetch()/XHR requests at the application level, so patching the Referer from JS isn’t an option.

I have partially solved the issue internally using a proxy, but isn’t exactly ideal.

Btw, similar issue with CORS (I have to allow origins to * on my webserver in order for this to work)

There are several products on the Marketplace affected by this issue

What would you expect the referer header to contain? The coui:// URL of the instrument initiating the request?

It is optional and not recommended for private URIs RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 so nothing here is incorrect.

It would be cool for the header to contain something like “this is a request from Microsoft Flight Simulator, we come in peace for all mankind”

Just something to avoid request from coui getting flagged as without an referer by Osm

I don’t know if it possible, just letting the team knows a limitation that has been met by developers, if there is something they could do, cool, otherwise they will tag this by design and everyone else will be sad to toss Osm from their available layers (or host the tiles by themselves :laughing:)