Пример #1
0
 /**
  * {@inheritdoc}
  */
 protected function response()
 {
     $benchmark = $this->benchmark('new:response');
     try {
         $response = parent::response();
         foreach ($this->config->defaultHeaders() as $header => $value) {
             $response = $response->withHeader($header, $value);
         }
         return $response;
     } finally {
         $this->benchmark($benchmark);
     }
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 protected function response()
 {
     $response = parent::response();
     foreach ($this->config['headers'] as $header => $value) {
         $response = $response->withHeader($header, $value);
     }
     return $response;
 }