From 5a9e9e97e4140e28eb799305614af8e20b29a64f Mon Sep 17 00:00:00 2001 From: guacs <126393040+guacs@users.noreply.github.com> Date: Fri, 22 Mar 2024 22:15:08 +0530 Subject: [PATCH] docs: document guards behavior when placed at controller and app level (#3230) --- docs/usage/security/guards.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/usage/security/guards.rst b/docs/usage/security/guards.rst index 673906cac5..f32ab35de1 100644 --- a/docs/usage/security/guards.rst +++ b/docs/usage/security/guards.rst @@ -121,6 +121,12 @@ As you can see in the above examples - ``guards`` is a list. This means you can Unlike ``dependencies`` , guards do not override each other but are rather *cumulative*. This means that you can define guards on different levels of your app, and they will combine. +.. caution:: + + If guards are placed at the controller or the app level, they **will** be executed on all ``OPTIONS`` requests as well. + For more details, including a workaround, refer https://github.com/litestar-org/litestar/issues/2314. + + The route handler "opt" key ---------------------------