openedx / edx-django-utils

edX utilities for Django Application development.
https://edx.readthedocs.io/projects/edx-django-utils/en/latest/
Apache License 2.0
26 stars 20 forks source link

feat: add CookieMonitoringMiddleware #200

Closed robrap closed 2 years ago

robrap commented 2 years ago

Description:

Adds CookieMonitoringMiddleware for monitoring cookie header sizes and cookie sizes. This middleware is being moved from edx-platform: https://github.com/openedx/edx-platform/blob/master/openedx/core/lib/request_utils.py#L93

Also includes moving the process_cookie_monitoring_logs.py script to this repository.

JIRA:

ARCHBOM-2054

Dependencies:

List dependencies on other outstanding PRs, issues, etc.

Merge checklist:

Post merge:

Author concerns:

I attempted a consolidated MonitoringMiddleware, but it got messy fast, and would have required a bunch of engineering to keep clean. So for now, we just need to add additional middleware as-needed.