Merge several middleware classes #7508

Closed
opened 2025-12-29 20:24:29 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Jan 13, 2023).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Merge the following middleware classes into one:

  • APIVersionMiddleware
  • DynamicConfigMiddleware
  • ExceptionHandlingMiddleware
  • LoginRequiredMiddleware
  • ObjectChangeMiddleware

Justification

Each of these middleware classes is responsible for a fairly minor yet crucial operation, and it doesn't really make sense that we would need to toggle them individually.

Note that I'm excluding RemoteUserMiddleware from this list, as it holds a considerable amount of custom logic, and we want to ensure it's always processed before the boilerplate stuff.

Originally created by @jeremystretch on GitHub (Jan 13, 2023). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Merge the following middleware classes into one: - APIVersionMiddleware - DynamicConfigMiddleware - ExceptionHandlingMiddleware - LoginRequiredMiddleware - ObjectChangeMiddleware ### Justification Each of these middleware classes is responsible for a fairly minor yet crucial operation, and it doesn't really make sense that we would need to toggle them individually. Note that I'm excluding `RemoteUserMiddleware` from this list, as it holds a considerable amount of custom logic, and we want to ensure it's always processed before the boilerplate stuff.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 20:24:29 +01:00
adam closed this issue 2025-12-29 20:24:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7508