comparison Applications/StoneWebViewer/WebApplication/app.js @ 1761:28755e42c007

Fix issue #197 (Support for passing credentials with all HTTP requests)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 May 2021 11:51:53 +0200
parents 9ac2a65d4172
children 634ff8993f6a
comparison
equal deleted inserted replaced
1760:e38b9875a969 1761:28755e42c007
1048 stone.SetSoftwareRendering(localStorage.settingSoftwareRendering == '1'); 1048 stone.SetSoftwareRendering(localStorage.settingSoftwareRendering == '1');
1049 1049
1050 if ('DicomCacheSize' in app.globalConfiguration) { 1050 if ('DicomCacheSize' in app.globalConfiguration) {
1051 stone.SetDicomCacheSize(app.globalConfiguration.DicomCacheSize); 1051 stone.SetDicomCacheSize(app.globalConfiguration.DicomCacheSize);
1052 } 1052 }
1053
1054 // Bearer token is new in Stone Web viewer 2.0
1055 var token = getParameterFromUrl('token');
1056 if (token !== undefined)
1057 {
1058 stone.AddHttpHeader('Authorization', 'Bearer ' + token);
1059 }
1053 1060
1054 console.warn('Stone properly initialized'); 1061 console.warn('Stone properly initialized');
1055 1062
1056 app.SetCombinedToolActions(); 1063 app.SetCombinedToolActions();
1057 1064