Skip to content

Commit

Permalink
Allow 127.0.0.1 to access logs
Browse files Browse the repository at this point in the history
  • Loading branch information
DEMON1A committed Aug 15, 2022
1 parent 9424743 commit a81f45d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handlers/logsHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
def Handler(requestHeaders):
if PUBLIC_LOGS:
return returnHTTPBasicResponse(readLogs(), {"content-type":"text/plain"}, 200)
elif requestHeaders['client-ip'] == "127.0.0.1":
# allow only localhost to acess this when denied
return returnHTTPBasicResponse(readLogs(), {"content-type":"text/plain"}, 200)
else:
return returnRenderedTemplate('WEngine/defaultPages/403.html', {}, 403)

0 comments on commit a81f45d

Please sign in to comment.