security.firewalls.dev: configuration security.firewalls.dev: used in any Symfony environment (dev, test, prod)!
In Symfony 4 , in order to disable firewalls for all routes in a simple dev environment, you can do something like this:
Installation:
config/packages/security.yaml :
parameters:
Override for symfony environment:
create a new config/packages/dev/parameters.yaml file:
parameters: env(SECURITY_DEV_PATTERN): '^/'
Now all routes are available without a firewall in Symfony dev
Override using environment variables:
You can also override SECURITY_DEV_PATTERN in the .env file:
SECURITY_DEV_PATTERN=^/
This only works if you have not included .env in your production environment or if you specifically override the SECURITY_DEV_PATTERN environment variable in the same place.
source share