From a78d2ced8aa87c979da4d607ff927f945787d201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 16 Dec 2020 16:06:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Events/OnRequest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 3ee3ae4a..de79566c 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -53,8 +53,7 @@ class OnRequest extends Callback public function onRequest(Request $request, Response $response) { try { - var_dump($request); - if ($request->header['request_method'] === 'OPTIONS') { + if ($request->server['request_method'] === 'OPTIONS') { $response->status(200); return $response->end(); }