Skip to content

Commit 549cb16

Browse files
Don't display an html response for drj api endpoints on non-debug envs (Fixes #993) (#994)
1 parent ba32223 commit 549cb16

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/thunderbird_accounts/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ def before_send(event: Event, hint: Hint) -> Event | None:
287287
},
288288
}
289289

290+
if not DEBUG:
291+
REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = [
292+
'rest_framework.renderers.JSONRenderer',
293+
]
294+
290295
REDIS_URL = os.getenv('REDIS_URL')
291296
AVAILABLE_CACHES = {
292297
'dev': {

0 commit comments

Comments
 (0)