OHIF-159 Fix wado-proxy issues
This commit is contained in:
parent
8d4a71fd73
commit
d86cac112b
@ -1,4 +1,3 @@
|
|||||||
import { OHIF } from 'meteor/ohif:core';
|
|
||||||
import { getWADORSImageId } from './getWADORSImageId';
|
import { getWADORSImageId } from './getWADORSImageId';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,7 +17,7 @@ export function getImageId(instance, frame) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (instance.wadouri) {
|
if (instance.wadouri) {
|
||||||
var imageId = 'dicomweb:' + OHIF.utils.absoluteUrl(instance.wadouri);
|
var imageId = 'dicomweb:' + instance.wadouri;
|
||||||
if (frame !== undefined) {
|
if (frame !== undefined) {
|
||||||
imageId += '&frame=' + frame;
|
imageId += '&frame=' + frame;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export function getWADORSImageId(instanceMetada) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const image = {
|
const image = {
|
||||||
uri: OHIF.utils.absoluteUrl(instance.wadorsuri),
|
uri: instance.wadorsuri,
|
||||||
//imageId : '',
|
//imageId : '',
|
||||||
//minPixelValue : 0,
|
//minPixelValue : 0,
|
||||||
//maxPixelValue : 255,
|
//maxPixelValue : 255,
|
||||||
|
|||||||
@ -11,6 +11,8 @@ Package.onUse(function(api) {
|
|||||||
api.use('standard-app-packages');
|
api.use('standard-app-packages');
|
||||||
api.use('iron:router@1.0.13');
|
api.use('iron:router@1.0.13');
|
||||||
|
|
||||||
|
api.use('ohif:core');
|
||||||
|
|
||||||
api.addFiles('server/namespace.js');
|
api.addFiles('server/namespace.js');
|
||||||
|
|
||||||
// Server-only
|
// Server-only
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
Settings = Object.assign((Meteor.settings && Meteor.settings.proxy) ? Meteor.settings.proxy : {}, {
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
uri : "/__wado_proxy",
|
|
||||||
|
Settings = Object.assign({
|
||||||
|
uri : OHIF.utils.absoluteUrl("/__wado_proxy"),
|
||||||
enabled: true
|
enabled: true
|
||||||
})
|
}, (Meteor.settings && Meteor.settings.proxy) ? Meteor.settings.proxy : {});
|
||||||
|
|
||||||
http = require("http");
|
http = require("http");
|
||||||
url = require("url");
|
url = require("url");
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
|
||||||
// Setup a Route using Iron Router to avoid Cross-origin resource sharing
|
// Setup a Route using Iron Router to avoid Cross-origin resource sharing
|
||||||
// (CORS) errors. We only handle this route on the Server.
|
// (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 request = this.request;
|
||||||
const response = this.response;
|
const response = this.response;
|
||||||
const params = this.params;
|
const params = this.params;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user