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

TensorBoard Projector has been blocked by CORS policy: No 'Access-Control-Allow-Origin' #16770

Closed
VolodymyrPavliukevych opened this issue Feb 5, 2018 · 5 comments
Assignees

Comments

@VolodymyrPavliukevych
Copy link

At http://projector.tensorflow.org/ website error.

System information

  • Have I written custom code:
    no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
    macOS 10.13.3,
    Safari: Version 11.0.3 (13604.5.6)
    Chrome: Version 63.0.3239.132 (Official Build) (64-bit)
  • TensorFlow installed from (source or binary):
    no

I am trying to publish my data over official projector.tensorflow.org website.

  1. Prepared: config, data, metadata.
  2. Hosted them on (Gist/google storage/my own website)
    With and without https.
  3. Trying to view on projector: Published config

Receive error: Failed to load cut: Redirect from 'cut' to 'cut' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://projector.tensorflow.org' is therefore not allowed access.

error-screen

There is way to launch chrome with --disable-web-security key, but that ruins idea to share data in public.

@tensorflowbutler
Copy link
Member

Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@dsmilkov
Copy link
Contributor

Hi,

Sorry for the delay here. Seems like the error is due to the fact that gist.github.com/VolodymyrPavliukevych/... redirects to gist.githubusercontent.com/VolodymyrPavliukevych, and the latter one has Access-Control-Allow-Origin: * in the header.

Try updating the tensorPath and metadataPath in your config.json to point to gist.githubusercontent.com instead of gist.github.com.

Hope this helps!

@VolodymyrPavliukevych
Copy link
Author

Hi, thanks for explanation. It works.
I have one more question, why I can't share on my own web site or Google storage?
The same error on projector.
Is that because I have to add "access-control-allow-origin:*" in headers at my hosting?

@dsmilkov
Copy link
Contributor

That's correct, the server that hosts your website should serve with "access-control-allow-origin:*", which is unusual for out-of-the-box hosting, since it's not an API service.

@ketil-malde
Copy link

Just wanted to add that you may have to restart your browser or otherwise reset things, I spent a good time messing with configurations before I noticed I was getting 304 (no change) return codes, and Firefox was apparently caching the access control policy as well as the contents. Works now :-)

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

4 participants