Skip to content

Commit

Permalink
feature: remove default value for allow private network path config (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejziemichod authored Jun 28, 2024
1 parent 71118f4 commit 818d437
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->append($this->getAllowOrigin())
->append($this->getAllowHeaders())
->append($this->getAllowMethods())
->append($this->getAllowPrivateNetwork())
->append($this->getAllowPrivateNetwork(true))
->append($this->getExposeHeaders())
->append($this->getMaxAge())
->append($this->getHosts())
Expand Down Expand Up @@ -139,10 +139,13 @@ private function getAllowMethods(): ArrayNodeDefinition
return $node;
}

private function getAllowPrivateNetwork(): BooleanNodeDefinition
private function getAllowPrivateNetwork(bool $withDefaultValue = false): BooleanNodeDefinition
{
$node = new BooleanNodeDefinition('allow_private_network');
$node->defaultFalse();

if ($withDefaultValue) {
$node->defaultFalse();
}

return $node;
}
Expand Down

0 comments on commit 818d437

Please sign in to comment.