jmikola / insecure-routes-bundle
Removes HTTPS scheme requirements from routes in your Symfony2 app (for dev/test environments).
Installs: 9 769
Dependents: 1
Suggesters: 0
Security: 0
Stars: 13
Watchers: 3
Forks: 3
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/config: ~2.1
- symfony/dependency-injection: ~2.1
- symfony/http-kernel: ~2.1
- symfony/routing: ~2.1
This package is auto-updated.
Last update: 2024-11-06 09:26:12 UTC
README
This bundle removes HTTPS schema requirements from all routes in your Symfony2
application, and is especially helpful if your dev
or test
environments are
not configured with SSL and you would like to avoid maintaining a separate copy
of your routing configuration with HTTPS requirements removed.
You probabably should not use this bundle in your prod
environment.
Compatibility
This bundle's master
branch maintains compatibility with Symfony2's master
branch. The sf-2.0
branch of this bundle maintains compatibility with
Symfony 2.0. You may use the following tags for this bundle:
- 3.0.x tracks the
master
branch. - 2.0.x tracks the
sf-2.0
branch.
Installation
Add JmikolaInsecureRoutesBundle to the registerBundles()
method of your
application kernel. Like WebProfilerBundle, this bundle should only be enabled
for your dev
and test
environments:
# app/AppKernel.php public function registerBundles() { if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Jmikola\InsecureRoutesBundle\JmikolaInsecureRoutesBundle(); } }
Configuration
There are no configuration options. Symfony2 will load the bundle's dependency injection extension automatically.
The extension will create a service that composes the existing
routing.loader
service and assumes its service ID. Whenever a RouteCollection
is loaded, any HTTPS _scheme
requirements among its routes will then be
removed. The filtering process is very similar to that of FrameworkBundle's
DelegatingLoader, which resolves short notation for _controller
defaults.