generated from gCubeCI/Pipeline-Docker-Template
Remove stripToken functionality
This commit is contained in:
parent
ad22dc24e7
commit
28141c34ab
16
src/pep.js
16
src/pep.js
|
@ -74,14 +74,14 @@ function enforce_legacy(r) {
|
|||
context.userinfo = userinfo
|
||||
context.record = buildAccountingRecord_legacy(context);
|
||||
|
||||
if (context.config["stripLegacyToken"] == true) {
|
||||
var subreq_args = JSON.parse(JSON.stringify(context.request.args));
|
||||
delete subreq_args["gcube-token"];
|
||||
} else {
|
||||
var subreq_args = context.request.args;
|
||||
}
|
||||
debug(context, "subrequest args:\n" + JSON.stringify(subreq_args), null, 2);
|
||||
return context.request.subrequest("/_backend", { method: context.request.method, args: JSON.stringify(subreq_args), headers: context.request.headersIn })
|
||||
// if (context.config["stripLegacyToken"] == true) {
|
||||
// var subreq_args = JSON.parse(JSON.stringify(context.request.args));
|
||||
// delete subreq_args["gcube-token"];
|
||||
// } else {
|
||||
// var subreq_args = context.request.args;
|
||||
// }
|
||||
// debug(context, "subrequest args:\n" + JSON.stringify(subreq_args), null, 2);
|
||||
return context.request.subrequest("/_backend", { method: context.request.method, args: JSON.stringify(context.request.args), headers: context.request.headersIn })
|
||||
}).then(reply => {
|
||||
// debug(context, "response from backend\n" + reply.responseText);
|
||||
debug(context, "Response status from backend: " + reply.status)
|
||||
|
|
Loading…
Reference in New Issue