Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony regex with variables in config .yaml files

$
0
0

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?


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>