From 7506af29b55be6d8944b21cbba9eb963d1e42600 Mon Sep 17 00:00:00 2001 From: Dave Long Date: Wed, 17 Apr 2024 14:39:14 +0100 Subject: [PATCH] Issue #3436136 by dineshkumarbollu, joachim: Improve documentation for OptionsRequestSubscriber (cherry picked from commit 4b54857210eb8c5f618a2190028484a61310c734) --- .../Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php index 66f55710815..4bd400a3662 100644 --- a/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/OptionsRequestSubscriber.php @@ -12,8 +12,9 @@ use Symfony\Component\Routing\Route; /** * Handles options requests. * - * Therefore it sends an options response using all methods on all possible - * routes. + * Listens to KernelEvents::REQUEST and responds to OPTIONS requests by + * providing an Allow header listing all the HTTP methods allowed for the + * requested routes. */ class OptionsRequestSubscriber implements EventSubscriberInterface {