Skip to content

Commit

Permalink
Merge pull request #18 from alchemy-fr/fix/add-ssl-parameter
Browse files Browse the repository at this point in the history
Add new node to disable ssl verification with available config var
  • Loading branch information
xrousset78800 authored Nov 23, 2021
2 parents 3b687b6 + beacb38 commit da6fb04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Bundle/DependencyInjection/PhraseanetConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function addSdkNode(NodeBuilder $builder)
->end()
->end()
->booleanNode('extended')->defaultTrue()->end()
->booleanNode('disable_ssl_verification')->defaultFalse()->end()
->scalarNode('uploader')->end()
->append((new CacheNodeBuilder())->getNode())
->append((new MappingNodeBuilder('mappings'))->getNode())
Expand Down
4 changes: 4 additions & 0 deletions src/Bundle/DependencyInjection/PhraseanetExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ protected function buildEntityManagerFactory(ContainerBuilder $container, array
$application->addMethodCall('setExtendedMode', [true]);
}

if (isset($configuration['disable_ssl_verification'])) {
$application->addMethodCall('setSslVerification', [!$configuration['disable_ssl_verification']]);
}

$tokenProvider = new Definition(ChainedTokenProvider::class);

$applicationTokenProvider = new Definition(ApplicationTokenProvider::class, [
Expand Down

0 comments on commit da6fb04

Please sign in to comment.