Zory преди 1 седмица
родител
ревизия
2f0a99f47d
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      config/plugin/linfly/annotation/route.php

+ 5 - 0
config/plugin/linfly/annotation/route.php

@@ -11,6 +11,11 @@ declare (strict_types=1);
 namespace LinFly\Annotation\Handle;
 
 use LinFly\Annotation\Bootstrap\AnnotationBootstrap;
+use Webman\Route;
+// 匹配所有options路由
+Route::options('[{path:.+}]', function (){
+    return response('',204);
+});
 
 if (!AnnotationBootstrap::isIgnoreProcess()) {
     RouteAnnotationHandle::createRoute();