feat(app): change ohif viewer to ohif app (#3451)
This commit is contained in:
1 parent
6715ad9bd6
commit
16afa740b6
333 files changed
+2123
-1149
No files matched your search
@@ -0,0 +1,23 @@
|
||||
export default async config => {
|
||||
const useDynamicConfig = config.dangerouslyUseDynamicConfig;
|
||||
|
||||
// Check if dangerouslyUseDynamicConfig enabled
|
||||
if (useDynamicConfig?.enabled) {
|
||||
// If enabled then get configUrl query-string
|
||||
let query = new URLSearchParams(window.location.search);
|
||||
let configUrl = query.get('configUrl');
|
||||
|
||||
if (configUrl) {
|
||||
// validate regex
|
||||
const regex = useDynamicConfig.regex;
|
||||
|
||||
if (configUrl.match(regex)) {
|
||||
const response = await fetch(configUrl);
|
||||
return response.json();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
Reference in new issue
Block a user