Shady Nawara
Shady Nawara

Reputation: 502

Forge Viewer: Adding authentication token to local file access

when using the forge viewer to view locally stored files, How can I add an authorization token to the header of all file access requests.

Upvotes: 1

Views: 149

Answers (1)

Bryan Huang
Bryan Huang

Reputation: 5342

Unfortunately load options won't cut it when set to local environment so you will head to make do with:

Autodesk.Viewing.Initializer(options, function(){
    Autodesk.Viewing.endpoint.HTTP_REQUEST_HEADERS = {
        Authorization: '233',
        ...//Other custom headers
    }

enter image description here

Upvotes: 1

Related Questions