diff --git a/UPDATE.md b/UPDATE.md index 6edb9ece8a72..313650dc8a15 100644 --- a/UPDATE.md +++ b/UPDATE.md @@ -18,7 +18,7 @@ RC4 to RC5 following configuration: framework: - proxy: true + trust_proxy_headers: true * To avoid hidden naming collisions, the AbstractType does not try to define the name of form types magically. You now need to implement the `getName()` diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 6ff788920147..40dbd0d6b4fe 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -47,7 +47,7 @@ public function getConfigTreeBuilder() $rootNode ->children() ->scalarNode('charset')->end() - ->scalarNode('proxy')->defaultFalse()->end() + ->scalarNode('trust_proxy_headers')->defaultFalse()->end() ->scalarNode('secret')->isRequired()->end() ->scalarNode('exception_controller')->defaultValue('Symfony\\Bundle\\FrameworkBundle\\Controller\\ExceptionController::showAction')->end() ->scalarNode('ide')->defaultNull()->end() diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index d9e3f4956c2b..c1b34ae4d87a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -66,7 +66,7 @@ public function load(array $configs, ContainerBuilder $container) $container->setParameter('kernel.secret', $config['secret']); $container->setParameter('exception_listener.controller', $config['exception_controller']); - $container->setParameter('kernel.proxy', $config['proxy']); + $container->setParameter('kernel.trust_proxy_headers', $config['trust_proxy_headers']); if (!empty($config['test'])) { $loader->load('test.xml'); diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php index 958bba763d24..1821de94c798 100644 --- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php @@ -37,7 +37,7 @@ class FrameworkBundle extends Bundle { public function boot() { - if ($this->container->getParameter('kernel.proxy')) { + if ($this->container->getParameter('kernel.trust_proxy_headers')) { Request::trustProxyData(); } }