mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Allowing push urls to not have a User Agent.
This commit is contained in:
parent
ee00128234
commit
d5625ad336
1 changed files with 2 additions and 1 deletions
|
@ -245,6 +245,7 @@ class UserAgentBanMiddleware:
|
|||
if 'profile' in request.path: return
|
||||
if 'haproxy' in request.path: return
|
||||
if 'account' in request.path: return
|
||||
if 'push' in request.path: return
|
||||
if getattr(settings, 'TEST_DEBUG'): return
|
||||
|
||||
if any(ua in user_agent for ua in BANNED_USER_AGENTS):
|
||||
|
@ -252,7 +253,7 @@ class UserAgentBanMiddleware:
|
|||
'error': 'User agent banned: %s' % user_agent,
|
||||
'code': -1
|
||||
}
|
||||
logging.user(request, "~FB~SN~BBBanned UA: ~SB%s" % (user_agent))
|
||||
logging.user(request, "~FB~SN~BBBanned UA: ~SB%s / %s (%s)" % (user_agent, request.path, request.META))
|
||||
|
||||
return HttpResponse(json.encode(data), status=403, mimetype='text/json')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue