From db9e33c71c097ca4aa2f0562f56ec636bdc1b785 Mon Sep 17 00:00:00 2001 From: guacs Date: Wed, 20 Mar 2024 16:26:04 +0530 Subject: [PATCH] docs: document guards behavior when placed at controller and app level --- 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 ---------------------------