update lokinetmon to work again with dns rebinding protection

pull/1196/head
Jeff Becker 4 years ago
parent fcf6f7119f
commit 510053cbce
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -29,7 +29,7 @@ class Monitor:
def jsonrpc(self, meth, params):
r = requests.post(
self._url,
headers={"Content-Type": "application/json"},
headers={"Content-Type": "application/json", "Host": "localhost"},
json={
"jsonrpc": "2.0",
"id": "0",
@ -204,9 +204,9 @@ class Monitor:
s["remoteAddr"], self.speedOf(s["txRateCurrent"]), self.speedOf(s["rxRateCurrent"])
)
)
if (s['txMsgs'] or 0) > 1:
if (s['txMsgQueueSize'] or 0) > 1:
self.win.addstr(" [out window:\t{}]".format(s['txMsgQueueSize']))
if (s['rxMsgs'] or 0) > 1:
if (s['rxMsgQueueSize'] or 0) > 1:
self.win.addstr(" [in window:\t{}]".format(s['rxMsgQueueSize']))
return y

Loading…
Cancel
Save