diff --git a/Packages/ohif-servers/both/schema/servers.js b/Packages/ohif-servers/both/schema/servers.js index 93e87d3e2..62e91701a 100644 --- a/Packages/ohif-servers/both/schema/servers.js +++ b/Packages/ohif-servers/both/schema/servers.js @@ -26,6 +26,7 @@ export const DICOMWebRequestOptions = new SimpleSchema({ auth: { type: String, label: 'Authentication', + defaultValue: 'orthanc:orthanc', optional: true }, logRequests: { diff --git a/Packages/ohif-servers/server/startup.js b/Packages/ohif-servers/server/startup.js index 30c718a2e..64c7a3204 100644 --- a/Packages/ohif-servers/server/startup.js +++ b/Packages/ohif-servers/server/startup.js @@ -4,6 +4,31 @@ import { OHIF } from 'meteor/ohif:core'; import { Servers } from 'meteor/ohif:servers/both/collections'; import { ServerConfiguration } from 'meteor/ohif:servers/both/schema/servers.js'; +// Validate the servers configuration +Meteor.startup(() => { + // Save custom properties (if any)... + // "Meteor.settings" and "Meteor.settings.public" are set by default... + let custom = { + private: Meteor.settings.custom, + public: Meteor.settings.public.custom + }; + + // ... and remove them to prevent clean up + delete Meteor.settings.custom; + delete Meteor.settings.public.custom; + + ServerConfiguration.clean(Meteor.settings); + + // TODO: Make the error messages more clear + // Taking this out for now to prevent confusion. + // check(Meteor.settings, ServerConfiguration); + + Meteor.settings.custom = custom.private; + Meteor.settings.public.custom = custom.public; + + OHIF.log.info(JSON.stringify(Meteor.settings, null, 2)); +}); + // Check the servers on meteor startup Meteor.startup(function() { OHIF.log.info('Updating servers information from JSON configuration'); @@ -34,28 +59,3 @@ Meteor.startup(function() { OHIF.servers.control.resetCurrentServer(); }); - -// Validate the servers configuration -Meteor.startup(() => { - // Save custom properties (if any)... - // "Meteor.settings" and "Meteor.settings.public" are set by default... - let custom = { - private: Meteor.settings.custom, - public: Meteor.settings.public.custom - }; - - // ... and remove them to prevent clean up - delete Meteor.settings.custom; - delete Meteor.settings.public.custom; - - ServerConfiguration.clean(Meteor.settings); - - // TODO: Make the error messages more clear - // Taking this out for now to prevent confusion. - // check(Meteor.settings, ServerConfiguration); - - Meteor.settings.custom = custom.private; - Meteor.settings.public.custom = custom.public; - - OHIF.log.info(JSON.stringify(Meteor.settings, null, 2)); -});