mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-04 16:20:06 -04:00
Move proxy header check to auth-requiring endpoints
The main drive behind this is to allow us to enable http healthchecks on the `/_status` endpoint. The healthcheck requests are happening directly on the instances without going to the proxy to get the header properly set. In any case, endpoints like `/_status` should be generally accessible by anything without requiring any form of authorization.
This commit is contained in:
@@ -219,8 +219,6 @@ def init_app(app):
|
||||
def record_user_agent():
|
||||
statsd_client.incr("user-agent.{}".format(process_user_agent(request.headers.get('User-Agent', None))))
|
||||
|
||||
app.before_request(request_helper.check_proxy_header_before_request)
|
||||
|
||||
@app.before_request
|
||||
def record_request_details():
|
||||
g.start = monotonic()
|
||||
|
||||
Reference in New Issue
Block a user