mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Adds the request-id middleware to the admin app
- adds a request-id to each request and passes that through to the response - this is picked up by the loggers and used to tie log events to a request
This commit is contained in:
@@ -25,7 +25,7 @@ from flask_wtf import CsrfProtect
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from notifications_python_client.errors import HTTPError
|
from notifications_python_client.errors import HTTPError
|
||||||
from notifications_utils import logging
|
from notifications_utils import logging, request_id
|
||||||
from notifications_utils.recipients import validate_phone_number, InvalidPhoneError
|
from notifications_utils.recipients import validate_phone_number, InvalidPhoneError
|
||||||
from pygments import highlight
|
from pygments import highlight
|
||||||
from pygments.formatters.html import HtmlFormatter
|
from pygments.formatters.html import HtmlFormatter
|
||||||
@@ -78,6 +78,7 @@ def create_app():
|
|||||||
init_app(application)
|
init_app(application)
|
||||||
logging.init_app(application)
|
logging.init_app(application)
|
||||||
init_csrf(application)
|
init_csrf(application)
|
||||||
|
request_id.init_app(application)
|
||||||
|
|
||||||
service_api_client.init_app(application)
|
service_api_client.init_app(application)
|
||||||
user_api_client.init_app(application)
|
user_api_client.init_app(application)
|
||||||
|
|||||||
Reference in New Issue
Block a user