| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function register() |
||
| 21 | { |
||
| 22 | $this->getContainer()->share('Zend\Diactoros\Response', function() { |
||
| 23 | $response = new Response(); |
||
| 24 | $response = $response->withHeader('Access-Control-Allow-Origin', '*'); |
||
| 25 | $response = $response->withHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); |
||
| 26 | $response = $response->withHeader('Access-Control-Max-Age', '1000'); |
||
| 27 | $response = $response->withHeader('Access-Control-Allow-Headers', 'Content-Type, X-Requested-With'); |
||
| 28 | $response = $response->withHeader('x-best-faction', 'Vanu Sovereignty'); |
||
| 29 | return $response->withStatus(504); |
||
| 30 | }); |
||
| 31 | |||
| 32 | $this->getContainer()->share('Zend\Diactoros\Response\SapiEmitter'); |
||
| 33 | |||
| 34 | $this->getContainer()->share('Zend\Diactoros\ServerRequest', function () { |
||
| 35 | return ServerRequestFactory::fromGlobals(); |
||
| 36 | }); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |