From ff96c77146263e4a8446e59263c0053b1688ae25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 16 Dec 2020 16:26:44 +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 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 93d179b3..f2034021 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -56,10 +56,6 @@ class OnRequest extends Callback /** @var HRequest $sRequest */ [$sRequest, $sResponse] = [HRequest::create($request), HResponse::create($response)]; - $sResponse->addHeader('Access-Control-Allow-Origin', '*'); - $sResponse->addHeader('Access-Control-Allow-Headers', $sRequest->headers->get('access-control-request-headers')); - $sResponse->addHeader('Access-Control-Request-Method', $sRequest->headers->get('access-control-request-method')); - if ($sRequest->is('favicon.ico')) { return $sResponse->send($sRequest->isNotFound(), 200); }