route.php 447 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: LinFei
  5. * Created time 2022/10/10 10:52:22
  6. * E-mail: fly@eyabc.cn
  7. */
  8. declare (strict_types=1);
  9. namespace LinFly\Annotation\Handle;
  10. use LinFly\Annotation\Bootstrap\AnnotationBootstrap;
  11. use Webman\Route;
  12. // 匹配所有options路由
  13. Route::options('[{path:.+}]', function (){
  14. return response('',204);
  15. });
  16. if (!AnnotationBootstrap::isIgnoreProcess()) {
  17. RouteAnnotationHandle::createRoute();
  18. }