anti-spam
This commit is contained in:
parent
18b879be14
commit
03b411e433
2 changed files with 25 additions and 1 deletions
|
|
@ -16,7 +16,13 @@ def new_form_comment():
|
|||
|
||||
try:
|
||||
data = request.form
|
||||
|
||||
# add client IP if provided by HTTP proxy
|
||||
logger.info('headers: {}'.format(request.headers))
|
||||
if 'X-Forwarded-For' in request.headers:
|
||||
data['clientip'] = request.headers['X-Forwarded-For']
|
||||
|
||||
# log
|
||||
logger.info(data)
|
||||
|
||||
# validate token: retrieve site entity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue