We are working on an Unreal application based on the Cesium for Unreal plugin to access a custom terrain (QTZ).
Each request to the terrain server must include an authentication token in the request header. We define this token in the tileset properties in Unreal.
When loading, the first file — https://ourserver/terrain/layer.json
— is retrieved successfully, and the server logs confirm that the token is present in the request.
However, once the terrain loader begins fetching tiles (for example: https://ourserver/terrain/2/1/3.terrain?v=1.1.0
), all of these requests fail with a 401 Unauthorized error. On the server side, we can see that these sub-requests do not include the authentication token in the header.
It looks like the defined header is not being propagated to subsequent tile requests. Interestingly, when accessing 3D Tiles, the same mechanism works fine — the header defined for tileset.json is also used for GLB and texture requests.
Has anyone encountered this same issue, or conversely, successfully accessed a custom terrain protected by a token?
Also, do you expect this to be fixed in the next release, or would you recommend that we try to investigate and submit a PR ourselves (though we have limited knowledge of Cesium-Native internals)?
We’ll try to get this fixed as soon as we can, but I can’t commit to a particular release. If your team has the bandwidth to take a look at submit a PR, that would be amazing!