I am using host parameter in security firewall configuration:
security: firewalls: admin: pattern: ^/ #this works host: ^admin\.test_domain\.test$ #this one does not host: ^%admin_subdomain_name%\.%domain_name%\.%tld%$ remember_me: secret: '%kernel.secret%' lifetime: 604800 # 1 week in seconds path: /
admin_subdomain_name
, domain_name
, tld
variables differs between environments. Thus I need them to set as variables. I guess there is other way by creating security.yaml for each environment (config/dev/security.yaml
, config/prod/security.yaml
).But I wanted to know if there is a way to use regexes with variables in configuration files?