Last Updated: February 25, 2016
·
1.938K
· tomaszsobczak

Prepare Symfony2 assets_base_urls for HTTPS

If you just switched your Symfony2 based site to HTTPS and you are missing „base url” for assets in your templates you need to fix framework configuration to handle HTTPS assets

HTTP only version

framework:
    templating:
        assets_base_urls: [ /assets ]

HTTP + HTTPS version

framework:
    templating:
        assets_base_urls: 
            http: [ /assets ]
            ssl:  [ /assets ]