configureStationArgument(); $this->addArgument('origin', InputArgument::REQUIRED, 'An HTTP(S) origin.'); } protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); $station = $this->findStation($input, $io); if (null === $station) { return self::FAILURE; } try { $origins = $this->corsConfiguration->addAllowedOrigin($station->id, (string)$input->getArgument('origin')); $this->reloadNginx($station, $io); $io->success('Allowed HLS CORS origin added.'); $this->renderOrigins($io, $origins); return self::SUCCESS; } catch (InvalidArgumentException $exception) { $io->error($exception->getMessage()); return self::INVALID; } } }