Skip to content

Commit

Permalink
refactor: minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Nov 20, 2024
1 parent 41b47b1 commit 205d72e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Command/Serve.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ private function buildSuccess(OutputInterface $output): void
if (null !== $headers = $this->getBuilder()->getConfig()->get('headers')) {
$output->writeln('Writing headers file...');
Util\File::getFS()->remove(Util::joinFile($this->getPath(), self::TMP_DIR, 'headers.ini'));
foreach ($headers as $header) {
Util\File::getFS()->appendToFile(Util::joinFile($this->getPath(), self::TMP_DIR, 'headers.ini'), "[{$header['source']}]\n");
foreach ($header['headers'] as $h) {
Util\File::getFS()->appendToFile(Util::joinFile($this->getPath(), self::TMP_DIR, 'headers.ini'), "{$h['key']} = \"{$h['value']}\"\n");
foreach ($headers as $entry) {
Util\File::getFS()->appendToFile(Util::joinFile($this->getPath(), self::TMP_DIR, 'headers.ini'), "[{$entry['path']}]\n");
foreach ($entry['headers'] as $header) {
Util\File::getFS()->appendToFile(Util::joinFile($this->getPath(), self::TMP_DIR, 'headers.ini'), "{$header['key']} = \"{$header['value']}\"\n");
}
}
}
Expand Down

0 comments on commit 205d72e

Please sign in to comment.