1
0
Fork 0

Stats access requires custom password

This commit is contained in:
Joao Gilberto Magalhaes 2019-07-18 00:06:40 -05:00
parent 8afffcebd5
commit f283cb7131
2 changed files with 10 additions and 10 deletions

View file

@ -12,11 +12,11 @@ result = {
"easymapping": [],
"customerrors": True if os.getenv("HAPROXY_CUSTOMERRORS") == "true" else False
}
if os.getenv("HAPROXY_USERNAME"):
if os.getenv("HAPROXY_PASSWORD"):
result["stats"] = {
"username": os.getenv("HAPROXY_USERNAME"),
"username": os.getenv("HAPROXY_USERNAME") if os.getenv("HAPROXY_USERNAME") else "admin",
"password": os.getenv("HAPROXY_PASSWORD"),
"port": os.getenv("HAPROXY_STATS_PORT"),
"port": os.getenv("HAPROXY_STATS_PORT") if os.getenv("HAPROXY_STATS_PORT") else "1936",
}
for line in lineList: