简体   繁体   English

Autodesk Forge 跨域请求被阻止错误

[英]Autodesk Forge Cross-Origin Request Blocked Error

We have web applications where we use Autodesk Forge viewer.我们有 web 应用程序,我们在其中使用 Autodesk Forge 查看器。 These were working as usual until yesterday.这些都照常工作,直到昨天。 We didn't make any changes for months for some of them and now out of nowhere, we are receiving Cross-Origin errors.我们几个月来没有对其中一些进行任何更改,现在不知从何而来,我们收到了跨域错误。 I have checked 3 of our web application with Forge, none of them are working: Firefox and Chrome give these kind of errors:我已经用 Forge 检查了我们的 3 个 web 应用程序,它们都没有工作:Firefox 和 Chrome 给出了这些错误:

Access to XMLHttpRequest at 'https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/res/locales/en/allstrings.json' from origin 'WEBSITE NAME' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:3000' that is not equal to the supplied origin.

Access to XMLHttpRequest at 'https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/lmvworker.min.js' from origin 'WEBSITE NAME' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:3000' that is not equal to the supplied origin.

and more png loading problems with errors above.以及更多带有上述错误的 png 加载问题。

I don't know if it is because of deployment platform heroku .我不知道是不是因为部署平台heroku I need help on this since I have no idea what has changed.我需要帮助,因为我不知道发生了什么变化。 On the one of the platforms, there were made no changes since last year but it stopped working also.在其中一个平台上,自去年以来没有进行任何更改,但它也停止了工作。

I am using this url to load the viewer:我正在使用这个 url 来加载查看器:

https://developer.api.autodesk.com/modelderivative/v2/viewers/style.min.css?v=v7.*
https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/viewer3D.min.js

I need to mention that at localhost, Forge Viewer loads the model without CORS Error and works fine.我需要提到的是,在本地主机上,Forge Viewer 加载 model 没有 CORS 错误并且工作正常。

Thanks for the help.谢谢您的帮助。

Update:更新:

According to @Can777, this issue was resolved by clearing browser history.根据@Can777,此问题已通过清除浏览器历史记录得到解决。

The problem is solved by deleting the browser histories from all browsers (Firefox nearly didn't have any history actually, since we only use chrome).通过从所有浏览器中删除浏览器历史记录来解决问题(Firefox 实际上几乎没有任何历史记录,因为我们只使用 chrome)。

============= ==============

I'm sorry to hear this issue is bothering you.很抱歉听到这个问题困扰着您。 We have reported this issue to our engineering team to have a look.我们已将此问题报告给我们的工程团队进行查看。 We will keep you updated once we got responses from them.一旦我们收到他们的回复,我们会及时通知您。 We apologize for any problem that had caused to you.对于给您造成的任何问题,我们深表歉意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM