| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class AllowCrossDomain |
||
|
1 ignored issue
–
show
|
|||
| 20 | { |
||
| 21 | protected $header = [ |
||
| 22 | 'Access-Control-Allow-Origin' => '*', |
||
| 23 | 'Access-Control-Allow-Methods' => 'GET, POST, PATCH, PUT, DELETE', |
||
| 24 | 'Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With', |
||
| 25 | ]; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * 允许跨域请求 |
||
| 29 | * @access public |
||
| 30 | * @param Request $request |
||
|
1 ignored issue
–
show
|
|||
| 31 | * @param Closure $next |
||
|
1 ignored issue
–
show
|
|||
| 32 | * @param array $header |
||
|
1 ignored issue
–
show
|
|||
| 33 | * @return Response |
||
| 34 | */ |
||
| 35 | public function handle($request, Closure $next, array $header = []) |
||
| 46 |