public function addRoute($path, NetworkComponentInterface $component) { $this->routes->add($path, new Route($path, ['_controller' => $component], $this->checkOrigin ? ['Origin' => $this->host] : [], [], $this->checkOrigin ? $this->host : '')); return $this; }