Commit 06a29331 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

frontendAddr -> frontendUrl, service nose -> nodes

parent 9bfd43b9
......@@ -303,6 +303,9 @@ function getServiceInfo(namespace, next, {details = false} = {}) {
let master = config.k8Api.url
let masterHostname = new url.URL(master).hostname
let node = config.k8Api.node
let frontendUrl = config.api.frontendUrl
let frontendHostname = new url.URL(frontendUrl).hostname
let frontendProtocol = new url.URL(frontendUrl).protocol
if (res.items)
for (let is in res.items) {
let s = res.items[is]
......@@ -312,7 +315,10 @@ function getServiceInfo(namespace, next, {details = false} = {}) {
ports: [],
master: master,
masterHostname: masterHostname,
node: node
nodes: [node],
frontendUrl: frontendUrl,
frontendProtocol: frontendProtocol,
frontendHostname: frontendHostname
}
if (s.spec.clusterIP && s.spec.clusterIP != 'None')
service.clusterIP = s.spec.clusterIP
......
......@@ -7,7 +7,7 @@ module.exports = function (app, redirect, config, proxyServer, proxyRouter, k8,
function setFrontendHeader() {
return function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', config.app.frontendAddr);
res.setHeader('Access-Control-Allow-Origin', config.app.frontendUrl);
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
res.header('Access-Control-Allow-Methods', 'POST, GET, PUT, DELETE, OPTIONS');
next();
......
......@@ -5,7 +5,7 @@
key: "web-certs/key.pem"
cert: "web-certs/cert.pem"
}
frontendAddr: "https://analytics-toolkit.nomad-coe.eu"
frontendUrl: "https://analytics-toolkit.nomad-coe.eu"
}
passport: {
strategy: "saml"
......
......@@ -2,7 +2,7 @@
"app": {
"secret": "APP_SECRET"
"port": "PORT"
"frontendAddr": "FRONTEND_BASE_URI"
"frontendUrl": "FRONTEND_BASE_URI"
}
"k8Api": {
"url": "KUBERNETES_SERVER_URL"
......
......@@ -8,7 +8,7 @@ app: {
resolveCacheTtlMaxMs: 30000
resolveCacheNMax: 30000
pageReloadTime: 5
frontendAddr: "http://127.0.0.1:4200"
frontendUrl: "http://127.0.0.1:4200"
catchErrors: false
templatesDir: "{{baseDir}}/templates"
baseReplacements: {
......
......@@ -4,7 +4,7 @@
key: "web-certs/key.pem"
cert: "web-certs/cert.pem"
}
frontendAddr: "https://labdev-nomad.esc.rzg.mpg.de"
frontendUrl: "https://labdev-nomad.esc.rzg.mpg.de"
debug: true
}
passport: {
......
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