mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #1399 from bgruening/ie
Interactive Environment updates
This commit is contained in:
@@ -119,14 +119,15 @@ class InteractiveEnviornmentRequest(object):
|
||||
'proxy_prefix': self.attr.proxy_prefix,
|
||||
}
|
||||
|
||||
web_port = self.attr.galaxy_config.galaxy_infrastructure_web_port
|
||||
conf_file['galaxy_web_port'] = web_port or self.attr.galaxy_config.guess_galaxy_port()
|
||||
|
||||
if self.attr.viz_config.has_option("docker", "galaxy_url"):
|
||||
conf_file['galaxy_url'] = self.attr.viz_config.get("docker", "galaxy_url")
|
||||
elif self.attr.galaxy_config.galaxy_infrastructure_url_set:
|
||||
conf_file['galaxy_url'] = self.attr.galaxy_config.galaxy_infrastructure_url.rstrip('/') + '/'
|
||||
else:
|
||||
conf_file['galaxy_url'] = request.application_url.rstrip('/') + '/'
|
||||
web_port = self.attr.galaxy_config.galaxy_infrastructure_web_port
|
||||
conf_file['galaxy_web_port'] = web_port or self.attr.galaxy_config.guess_galaxy_port()
|
||||
# Galaxy paster port is deprecated
|
||||
conf_file['galaxy_paster_port'] = conf_file['galaxy_web_port']
|
||||
|
||||
|
||||
@@ -95,9 +95,17 @@ DynamicProxy.prototype.handleProxyRequest = function(req, res) {
|
||||
this.rewriteRequest(req);
|
||||
res.oldWriteHead = res.writeHead;
|
||||
res.writeHead = function(statusCode, headers) {
|
||||
res.setHeader('Access-Control-Allow-Origin', origin);
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
res.oldWriteHead(statusCode, headers);
|
||||
|
||||
try {
|
||||
res.setHeader('Access-Control-Allow-Origin', origin);
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
res.oldWriteHead(statusCode, headers);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Header could not be modified.");
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
}
|
||||
this.proxy.web(req, res, {
|
||||
target: target
|
||||
@@ -119,9 +127,15 @@ DynamicProxy.prototype.handleWs = function(req, res, head) {
|
||||
this.rewriteRequest(req);
|
||||
res.oldWriteHead = res.writeHead;
|
||||
res.writeHead = function(statusCode, headers) {
|
||||
res.setHeader('Access-Control-Allow-Origin', origin);
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
res.oldWriteHead(statusCode, headers);
|
||||
try {
|
||||
res.setHeader('Access-Control-Allow-Origin', origin);
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
res.oldWriteHead(statusCode, headers);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Header could not be modified.");
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
this.proxy.ws(req, res, head, {
|
||||
target: target
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user