| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 10 | public function handle($request, Closure $next)  | 
            ||
| 11 |     { | 
            ||
| 12 |         if(config('laravel-api-generator.json_response')) { | 
            ||
| 13 | $request->headers->add([  | 
            ||
| 14 | 'Accept'=>'application/json',  | 
            ||
| 15 | 'Content-Type'=>'application/json'  | 
            ||
| 16 | ]);  | 
            ||
| 17 | }  | 
            ||
| 18 |         if(config('laravel-api-generator.allow_cross_origin')) { | 
            ||
| 19 | $request->headers->add([  | 
            ||
| 20 | 'Access-Control-Allow-Origin' => '*',  | 
            ||
| 21 | 'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, OPTIONS'  | 
            ||
| 22 | ]);  | 
            ||
| 23 | }  | 
            ||
| 24 | return $next($request);  | 
            ||
| 25 | }  | 
            ||
| 26 | }  | 
            ||
| 27 |