no share in unauthenticated

This commit is contained in:
ville rantanen
2018-07-01 16:54:50 +03:00
parent 42ad2da90a
commit f11486bde0
2 changed files with 2 additions and 8 deletions

View File

@@ -7,7 +7,8 @@ class Notifier:
pass
def notify(self, msg):
self.output = open('/code/data/notifier.log','at')
msg['address'] = msg['environment']['HTTP_X_FORWARDED_FOR']
if 'HTTP_X_FORWARDED_FOR' in msg['environment']:
msg['address'] = msg['environment']['HTTP_X_FORWARDED_FOR']
msg['date'] = datetime.now().isoformat()
del msg['environment']
self.output.write(json.dumps(msg, sort_keys = True)+"\n")