简体   繁体   English

如何在Forge Viewer3D中设置“ withCredential选项”?

[英]How to set “withCredential Option” in Forge Viewer3D?

I am using viewer3D at my on premises environment. 我在内部环境中使用viewer3D。

So I had download all model files locally. 因此,我已经在本地下载了所有模型文件。

URL for viewer is 观看者的网址为

https://www.company.com/viewer3D.html

URL for models are 模型的网址是

https://model.company.com/some-model-files...

Then, the viewer requests models by CORS XHR Request. 然后,查看器通过CORS XHR Request请求模型。

With this request, I want send COOKIE. 有了这个请求,我想发送COOKIE。

So I have to set withCredentials = true 所以我必须设置withCredentials = true

Is there a way to set withCredentials = true in the viewer? 有没有办法在查看器中设置withCredentials = true

There is no API that lets you control that setting. 没有API可让您控制该设置。 It is in the source of the viewer. 它位于查看器的来源中。

One workaround would be to grab all the files of the viewer SDK and modify the source, then use the modified version in your application. 一种解决方法是获取Viewer SDK的所有文件并修改源,然后在应用程序中使用修改后的版本。

The source of the viewer SDK is not directly accessible, unless you download manually all the required files for a specific version. 除非您手动下载特定版本的所有必需文件,否则无法直接访问查看器SDK的源。 Alternatively you can PM me and will send you by email a zip with all required resources for the current version: philippe.leefsma"at"autodesk.com. 另外,您可以PM我,并将通过电子邮件将包含当前版本所有必需资源的zip发送给您:philippe.leefsma“ at” autodesk.com。

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

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