summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-01-18 23:06:51 +0100
committerGitHub <noreply@github.com>2019-01-18 23:06:51 +0100
commit68e5ce8f9a70ceaee9dbe2527ff59bef06786f10 (patch)
tree92472ba94969ee7e1f83a3c761458a95b590c71a /tests
parent67cd486e7ac10113bd428d90ecb438d7c33215ba (diff)
Bug fix for netdata behind authenticated proxies (#5216)
* Was incorrectly updating the headers when the Authorization header was being sent * Use X-Auth-Token instead of Authorization header, to allow the management API to work authenticated behind proxies as well
Diffstat (limited to 'tests')
-rwxr-xr-xtests/health_mgmtapi/health-cmdapi-test.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/health_mgmtapi/health-cmdapi-test.sh.in b/tests/health_mgmtapi/health-cmdapi-test.sh.in
index 0847be0079..5e218b11e4 100755
--- a/tests/health_mgmtapi/health-cmdapi-test.sh.in
+++ b/tests/health_mgmtapi/health-cmdapi-test.sh.in
@@ -41,7 +41,7 @@ check () {
cmd () {
echo -e "${WHITE}Cmd '${1}', expecting '${2}'"
- RESPONSE=$(curl -s "http://$URL/api/v1/manage/health?${1}" -H "Authorization: Bearer $TOKEN" 2>&1)
+ RESPONSE=$(curl -s "http://$URL/api/v1/manage/health?${1}" -H "X-Auth-Token: $TOKEN" 2>&1)
if [ "${RESPONSE}" != "${2}" ] ; then
echo -e "${RED}ERROR: Response '${RESPONSE}' != '${2}'"
err=$((err+1))