]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Document `status_code` parameter on `requires` when using WebSockets (#1636)
authorMarcelo Trylesinski <marcelotryle@gmail.com>
Tue, 17 May 2022 09:36:34 +0000 (11:36 +0200)
committerGitHub <noreply@github.com>
Tue, 17 May 2022 09:36:34 +0000 (11:36 +0200)
docs/authentication.md

index d6cec3fb2053167f4a697818d5c242f7c22d2a4b..513db5c84808d826d20f1ec421fe86685657d938 100644 (file)
@@ -115,6 +115,10 @@ async def dashboard(request):
     ...
 ```
 
+!!! note
+    The `status_code` parameter is not supported with WebSockets. The 403 (Forbidden)
+    status code will always be used for those.
+
 Alternatively you might want to redirect unauthenticated users to a different
 page.