Cors   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace App\Http\Middleware;
6
7
use Closure;
8
9
final class Cors
10
{
11
    public function handle($request, Closure $next)
12
    {
13
        return $next($request)
14
            ->header('Access-Control-Allow-Origin', '*')
15
            ->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
16
            ->header('Access-Control-Allow-Headers', 'Origin, Content-Type, Accept, Authorization, X-Requested-With')
17
            ->header('Access-Control-Allow-Credentials', 'true');
18
    }
19
}
20