保存今天的修改
This commit is contained in:
@@ -2,10 +2,13 @@
|
||||
|
||||
import time
|
||||
|
||||
from flask import current_app, jsonify, request
|
||||
from flask import current_app, g, jsonify, request
|
||||
|
||||
|
||||
def rate_limit():
|
||||
# Authenticated staff polling has a separate trust boundary from public traffic.
|
||||
if getattr(g, 'staff', None):
|
||||
return None
|
||||
path = request.path
|
||||
if path in ('/healthz', '/api/visitor/human/poll') or path.startswith('/static') or path.startswith('/api/human/'):
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user