There was an error while loading. Please reload this page.
1 parent 6a986c5 commit f074b8aCopy full SHA for f074b8a
1 file changed
frontend/api.py
@@ -197,6 +197,11 @@ def wrapper(*args, **kwargs):
197
try:
198
extract_key(request, 'api_key')
199
except (KeyNotFound, InvalidKeyValue):
200
+ ip = request.environ.get(
201
+ 'HTTP_X_FORWARDED_FOR',
202
+ request.remote_addr
203
+ )
204
+ LOGGER.warning(f'Unauthorised request from {ip}')
205
return return_api({}, 'ApiKeyInvalid', 401)
206
207
diffuse_timers()
0 commit comments