mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-25 20:51:23 +03:00
MeshCMD Route missing HTTP host header fix.
This commit is contained in:
parent
97bd723e4e
commit
8eaa1ee4a9
@ -2034,9 +2034,9 @@ function startRouter() {
|
||||
if (xtoken != null) { xurlargs.push('token=' + xtoken); }
|
||||
} else {
|
||||
if (xtoken != null) {
|
||||
options.headers = { 'x-meshauth': Buffer.from(settings.username, 'binary').toString('base64') + ',' + Buffer.from(settings.password, 'binary').toString('base64') + ',' + Buffer.from(xtoken, 'binary').toString('base64') };
|
||||
options.headers = { 'host': options.host, 'x-meshauth': Buffer.from(settings.username, 'binary').toString('base64') + ',' + Buffer.from(settings.password, 'binary').toString('base64') + ',' + Buffer.from(xtoken, 'binary').toString('base64') };
|
||||
} else {
|
||||
options.headers = { 'x-meshauth': Buffer.from(settings.username, 'binary').toString('base64') + ',' + Buffer.from(settings.password, 'binary').toString('base64') };
|
||||
options.headers = { 'host': options.host, 'x-meshauth': Buffer.from(settings.username, 'binary').toString('base64') + ',' + Buffer.from(settings.password, 'binary').toString('base64') };
|
||||
}
|
||||
}
|
||||
} else { options.headers = { 'x-meshauth': '*' }; } // Request inner authentication
|
||||
|
Loading…
Reference in New Issue
Block a user