🔒️(drf) disable browsable HTML API renderer

The `BrowsableAPIRenderer` generates a form to test POST/PUT/... actions
and fill the FK fields with unfiltered data. This issue has been spoted
on visio and fixed https://github.com/suitenumerique/meet/pull/508
This commit is contained in:
Quentin BEY
2025-04-30 15:34:48 +02:00
parent a8d20bacb0
commit 889291c7f3
3 changed files with 13 additions and 3 deletions

View File

@@ -20,9 +20,9 @@ def test_login_view_options(client):
assert response.status_code == 200
assert response.headers == {
"Content-Type": "application/json",
"Vary": "Accept, Authorization, origin, Accept-Language, Cookie",
"Vary": "Authorization, origin, Accept-Language, Cookie",
"Allow": "POST, OPTIONS",
"Content-Length": "209",
"Content-Length": "197",
"X-Frame-Options": "DENY",
"Content-Language": "en-us",
"X-Content-Type-Options": "nosniff",
@@ -52,7 +52,7 @@ def test_login_view_authorize(client):
assert response.headers == {
"Content-Type": "application/json",
"Vary": "Accept, Authorization, Cookie, origin, Accept-Language",
"Vary": "Authorization, Cookie, origin, Accept-Language",
"Allow": "POST, OPTIONS",
"Content-Length": "36",
"X-Frame-Options": "DENY",