setExposedHeaders() public method

Right before the response is sent to the client, whitelist all included Imbo-headers in the "Access-Control-Expose-Headers"-header
public setExposedHeaders ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The event instance
Example #1
0
 /**
  * @covers Imbo\EventListener\Cors::setExposedHeaders
  */
 public function testDoesNotAddExposeHeadersHeaderWhenOriginIsInvalid()
 {
     $listener = new Cors([]);
     $headers = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');
     $headers->expects($this->never())->method('add');
     $this->response->headers = $headers;
     $listener->setExposedHeaders($this->event);
 }