Commit e34210a3 authored by Mikaël Salson's avatar Mikaël Salson

crossDomain.js: Proxy variable to set-up a proxy

This follows commit 6f79c840 that wrongly removed a similar proxy variable.
Actually in some cases we may need to have a proxy in a place different
from where the database is. This is the case when servers have high restrictions
on the websites they can connect to.
parent 04f636a6
......@@ -21,6 +21,9 @@ var config = {
"cgi_address" : "https://db.vidjil.org/cgi/", // Public test server
// "cgi_address" : "http://127.0.1.1/cgi-bin/",
/* Proxy for accessing resources without cross-domain issues */
"proxy": "https://db.vidjil.org/proxy/",
/* Used for the standalone http://app.vidjil.org/analyze page */
"segmenter_address" : "https://db.vidjil.org/vidjil/segmenter",
......
......@@ -161,12 +161,12 @@ function imgtPostForSegmenter(species, data, system, segmenter, override_imgt_op
//disabled due to security concerns
//form.action = "http://www.imgt.org/IMGT_vquest/vquest";
//using proxy on server to allow requests on other site than vidjil one's in JS.
if (typeof config != 'undefined' && typeof config.db_address != 'undefined') {
form.action = config.db_address+"/proxy/imgt"
if (typeof config != 'undefined' && typeof config.proxy != 'undefined') {
form.action = config.proxy+"/imgt"
} else {
console.log({
"type": "flash",
"msg": "Your installation doesn't seem to be associated with a database.",
"msg": "Your installation doesn't seem to have an associated proxy.",
"priority": 2
});
}
......@@ -433,12 +433,12 @@ function assignSubsetsPost(species, data, system) {
form.target = "_blank";
form.enctype = 'multipart/form-data';
form.name = 'assignsubsets';
if (typeof config != 'undefined' && typeof config.db_address != 'undefined') {
form.action = config.db_address+"/proxy/assign_subsets"
if (typeof config != 'undefined' && typeof config.proxy != 'undefined') {
form.action = config.proxy+"/assign_subsets"
} else {
console.log({
"type": "flash",
"msg": "Your installation doesn't seem to be associated with a database.",
"msg": "Your installation doesn't seem to have an associated proxy.",
"priority": 2
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment