Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Access assets globally #1044

Closed
2 of 11 tasks
whiteyhat opened this issue Feb 23, 2020 · 2 comments
Closed
2 of 11 tasks

Access assets globally #1044

whiteyhat opened this issue Feb 23, 2020 · 2 comments

Comments

@whiteyhat
Copy link

whiteyhat commented Feb 23, 2020

Description

I want to load my gtlf assets from an external host. Eg: My s3 CloudFront.

Problem

The poster parameter obviously works. But when it loads the gtlf is configured to only work locally

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • Helios
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows

Versions

  • model-viewer: v0.9.0
  • three.js: latest
@cdata
Copy link
Contributor

cdata commented Feb 24, 2020

@whiteyhat are you sending proper CORS headers with the response? Permissive CORS are necessary when serving glTF models from any web server, and for Amazing S3 I know they do not set them by default (you have to configure them).

Here is another issue where I gave a similar answer: #1015

Here is a help article that describes how to enable CORS for an Amazon S3 bucket: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors

@niloriver
Copy link

Hi guys.
In my case I'm allowing everything and having the same problem.

No 'Access-Control-Allow-Origin' header is present on the requested resource.

But other mime-types it loads from anywhere with no problem.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants