问题
I got a canvas jQuery pluing script on my tumblr theme,
I got this error on Chrome:
Cross-origin image load denied by Cross-Origin Resource Sharing policy.
Tumblr uploads images to http://static.tumblr.com/
Even there is no different domain between files and account,
Same location, same domain...
But why do I get that error?
Any solution?
Thank you!
回答1:
what epascarello said, subdomain != same domain
because you are on the same root-domain you could set the document.domain in your theme to static.tumblr.com if you dont need it for anything else (eg. tracking...)
document.domain = 'static.tumblr.com';
do that as early as can.
来源:https://stackoverflow.com/questions/14459894/js-on-tumblr-cross-origin-resource-sharing-policy-error