Strawberry debug toolbar must not be enabled in non-debug mode #10201

Closed
opened 2025-12-29 21:28:15 +01:00 by adam · 2 comments
Owner

Originally created by @abhi1693 on GitHub (Sep 8, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.1.0

Python Version

3.12

Steps to Reproduce

Go to settings.py and notice that strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware is in the middleware always enabled

Expected Behavior

strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware must only be enabled in debug mode

Observed Behavior

strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware is called during every request to netbox

Originally created by @abhi1693 on GitHub (Sep 8, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.1.0 ### Python Version 3.12 ### Steps to Reproduce Go to `settings.py` and notice that `strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware` is in the `middleware` always enabled ### Expected Behavior `strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware` must only be enabled in `debug` mode ### Observed Behavior `strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware` is called during every request to netbox
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:28:15 +01:00
adam closed this issue 2025-12-29 21:28:15 +01:00
Author
Owner

@arthanson commented on GitHub (Sep 9, 2024):

@abhi1693 were you actually seeing this causing issues? The debug toolbar (non strawberry) can be installed by default as it checks internally if DEBUG is set. Curious what issues strawberry one is causing in non debug mode?

@arthanson commented on GitHub (Sep 9, 2024): @abhi1693 were you actually seeing this causing issues? The debug toolbar (non strawberry) can be installed by default as it checks internally if DEBUG is set. Curious what issues strawberry one is causing in non debug mode?
Author
Owner

@abhi1693 commented on GitHub (Sep 9, 2024):

Even when the requests are from the rest API endpoint, our APM data shows it originated from strawberry django which makes it difficult to troubleshoot as we don't even use graphql in our integrations

@abhi1693 commented on GitHub (Sep 9, 2024): Even when the requests are from the rest API endpoint, our APM data shows it originated from strawberry django which makes it difficult to troubleshoot as we don't even use graphql in our integrations
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10201