diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 86173c13..f38c08ac 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -53,6 +53,10 @@ class OnRequest extends Callback public function onRequest(Request $request, Response $response) { try { + if ($request->header['request_method'] === 'OPTIONS') { + $response->status(200); + return $response->end(); + } /** @var HRequest $sRequest */ [$sRequest, $sResponse] = [HRequest::create($request), HResponse::create($response)]; if ($sRequest->is('favicon.ico')) {