Skip to content
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

xhr.withCredential with TextureHandler #1649

Open
jinwoobot opened this issue Aug 12, 2019 · 0 comments
Open

xhr.withCredential with TextureHandler #1649

jinwoobot opened this issue Aug 12, 2019 · 0 comments

Comments

@jinwoobot
Copy link
Contributor

Description

I tried to set crossOrigin = "anonymous" using assetPrefix: true
it's works well except texture(401 error)

  • this.app = new pc.Application(this.canvas, {
    mouse: new pc.Mouse(this.canvas),
    assetPrefix: true,
    });

so I add below code

  • this.app.loader._handlers.texture.crossOrigin = 'use-credentials';

and tried to find http options in TextHandler.load
but, It's {retry:this.retryRequests} set by default.

I think user can change this options.

Not engine code change like below

  • xhr = new XMLHttpRequest;
    xhr.open(method, url, options.async);
    options.withCredentials = true; //Add quick fix solution
    xhr.withCredentials = options.withCredentials !== undefined ? options.withCredentials : false;
@jinwoobot jinwoobot changed the title Using xhr.withCredential with TextHandler xhr.withCredential with TextHandler Aug 12, 2019
@jinwoobot jinwoobot changed the title xhr.withCredential with TextHandler xhr.withCredential with TextureHandler Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants