Browse Source

Add client ip to resolve_hash

master
Burathar 4 years ago
parent
commit
1b2f1d77f0
  1. 2
      app/routes.py

2
app/routes.py

@ -72,5 +72,5 @@ def resolve_hash(hash): @@ -72,5 +72,5 @@ def resolve_hash(hash):
db.session.commit()
countermessage = "" if url.view_counter is None else f". View counter was lowered to {url.view_counter}"
app.logger.info(f"{request.environ['REMOTE_ADDR']} requested hash '{url.hash}' which resolved to '{url.url}'{countermessage}")
app.logger.info(f"{request.environ['HTTP_X_FORWARDED_FOR']} requested hash '{url.hash}' which resolved to '{url.url}'{countermessage}")
return redirect(url.url, 301)

Loading…
Cancel
Save