-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GroundPolylinePrimitive._initializeTerrainHeightsWorker fails when app is served via a proxied domain #6711
Comments
@madole @hpinkos does this also apply to non-worker requests for the terrain heights JSON too? [EDIT] ah I also don't know how |
yeah it's handled in |
Replaced by #6720 (though I'm going to keep this branch around until that one gets merged). |
Whoops, meant to comment on the PR not the issue. |
GroundPolylinePrimitive._initializeTerrainHeightsWorker tries to load in the
approximateTerrainHeights.json
from a relative path.This then calls the
buildModuleUrl
function with that path before passing it toResource.fetchJson
buildModuleUrl
first does a check to see if it's running in node by checkingtypeof document === 'undefined'
and if true, it just returnsmoduleID
.When inside a web worker, document is undefined and the relative path is returned as it would be in node. This is fine when the code is being accessed on the same domain as it's being served on.
But when you proxy the app, the relative path becomes
http://proxied-url.com/../Assets/approximateTerrainHeights.json
which doesn't exist as the JSON is being served on a different domain and so theResource.fetchJson
blows up.The text was updated successfully, but these errors were encountered: