mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle httpAdminRoot missing ending slash with login strategy
Fixes #2473
This commit is contained in:
parent
1830478ec3
commit
22de8855c1
@ -100,7 +100,10 @@ function login(req,res) {
|
|||||||
}
|
}
|
||||||
} else if (mergedAdminAuth.type === "strategy") {
|
} else if (mergedAdminAuth.type === "strategy") {
|
||||||
|
|
||||||
var urlPrefix = (settings.httpAdminRoot==='/')?"":settings.httpAdminRoot;
|
var urlPrefix = (settings.httpAdminRoot||"").replace(/\/$/,"");
|
||||||
|
if (urlPrefix.length > 0) {
|
||||||
|
urlPrefix += "/";
|
||||||
|
}
|
||||||
response = {
|
response = {
|
||||||
"type":"strategy",
|
"type":"strategy",
|
||||||
"prompts":[{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}]
|
"prompts":[{type:"button",label:mergedAdminAuth.strategy.label, url: urlPrefix + "auth/strategy"}]
|
||||||
|
Loading…
Reference in New Issue
Block a user