Skip to content
Snippets Groups Projects
Commit 37fe6416 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

easy config to suppress user custom params

parent e48b9d7a
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,10 @@ module.exports = function (app, redirect, config, proxyServer, proxyRouter, k8, ...@@ -35,7 +35,10 @@ module.exports = function (app, redirect, config, proxyServer, proxyRouter, k8,
for (var x in obj) { return false; } for (var x in obj) { return false; }
return true; return true;
} }
extraArgs = Object.assign({},req.query) var query = {}
if (cconf.entryPoint.replacementsFromQueryParameters)
query = req.query
extraArgs = Object.assign({},query)
if (!isEmpty(extraArgs) && !extraArgs.imageSubtype) if (!isEmpty(extraArgs) && !extraArgs.imageSubtype)
extraArgs.imageSubtype = `custom${compactSha.objectSha(extraArgs, prefix='').replace(/[-_]/g,'').slice(0,5).toLowerCase()}` extraArgs.imageSubtype = `custom${compactSha.objectSha(extraArgs, prefix='').replace(/[-_]/g,'').slice(0,5).toLowerCase()}`
extraArgs.path = req.url extraArgs.path = req.url
......
...@@ -77,6 +77,7 @@ k8component: { ...@@ -77,6 +77,7 @@ k8component: {
redirectTarget: "{{prefix}}/" redirectTarget: "{{prefix}}/"
execCommand: [] execCommand: []
exclusiveStartPoint: false exclusiveStartPoint: false
replacementsFromQueryParameters: true
} }
commands: { commands: {
path: "{{prefix}}/cM" path: "{{prefix}}/cM"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment