OHIF-159 Fix wado-proxy issues

This commit is contained in:
Evren Ozkan committed 2017-03-09 14:19:05 -05:00
1 parent 8d4a71fd73
commit d86cac112b
5 files changed
+12 -7

No files matched your search

@@ -1,4 +1,3 @@
import { OHIF } from 'meteor/ohif:core';
import { getWADORSImageId } from './getWADORSImageId';
/**
@@ -18,7 +17,7 @@ export function getImageId(instance, frame) {
}
if (instance.wadouri) {
var imageId = 'dicomweb:' + OHIF.utils.absoluteUrl(instance.wadouri);
var imageId = 'dicomweb:' + instance.wadouri;
if (frame !== undefined) {
imageId += '&frame=' + frame;
}
@@ -27,7 +27,7 @@ export function getWADORSImageId(instanceMetada) {
}
const image = {
uri: OHIF.utils.absoluteUrl(instance.wadorsuri),
uri: instance.wadorsuri,
//imageId : '',
//minPixelValue : 0,
//maxPixelValue : 255,
+2
View File
@@ -11,6 +11,8 @@ Package.onUse(function(api) {
api.use('standard-app-packages');
api.use('iron:router@1.0.13');
api.use('ohif:core');
api.addFiles('server/namespace.js');
// Server-only
+5 -3
View File
@@ -1,7 +1,9 @@
Settings = Object.assign((Meteor.settings && Meteor.settings.proxy) ? Meteor.settings.proxy : {}, {
uri : "/__wado_proxy",
import { OHIF } from 'meteor/ohif:core';
Settings = Object.assign({
uri : OHIF.utils.absoluteUrl("/__wado_proxy"),
enabled: true
})
}, (Meteor.settings && Meteor.settings.proxy) ? Meteor.settings.proxy : {});
http = require("http");
url = require("url");
+3 -1
View File
@@ -1,6 +1,8 @@
import { OHIF } from 'meteor/ohif:core';
// Setup a Route using Iron Router to avoid Cross-origin resource sharing
// (CORS) errors. We only handle this route on the Server.
Router.route(Settings.uri, function() {
Router.route(Settings.uri.replace(OHIF.utils.absoluteUrl(), ''), function() {
const request = this.request;
const response = this.response;
const params = this.params;