Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 1 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
19 | { |
||
20 | 1 | $response = $handler->handle($request); |
|
21 | |||
22 | 1 | return $response |
|
23 | 1 | ->withHeader(Header::ALLOW, '*') |
|
24 | 1 | ->withHeader(Header::VARY, 'Origin') |
|
25 | 1 | ->withHeader(Header::ACCESS_CONTROL_ALLOW_ORIGIN, '*') |
|
26 | 1 | ->withHeader(Header::ACCESS_CONTROL_ALLOW_METHODS, 'GET,OPTIONS,HEAD,POST,PUT,PATCH,DELETE') |
|
27 | 1 | ->withHeader(Header::ACCESS_CONTROL_ALLOW_HEADERS, '*') |
|
28 | 1 | ->withHeader(Header::ACCESS_CONTROL_ALLOW_CREDENTIALS, 'true') |
|
29 | 1 | ->withHeader(Header::ACCESS_CONTROL_MAX_AGE, '86400'); |
|
30 | } |
||
32 |