Description
Our site is 100% SSL, so ideally, we would like only to set one relative path for the assets and let symfony do de work:
framework:
templating:
assets_base_url: /path/to/my/assets
and then in Twig:
<img src="{{ asset('logo.png') }}"/>
Which should render:
<img src="/path/to/my/assets/logo.png"/>
But unfortunately, under SSL it renders:
<img src="logo.png"/>
The documentation clearly states:
If a URL starts with https:// or is protocol-relative (i.e. starts with //) it will be added to both collections. URL's starting with http:// will only be added to the http collection.
But that implies that relative paths (not starting with "https://" nor "//") won't be added to the ssl collection, which makes us do more work to configure the urls. Wouldn't it be better if ALL urls were copied to the SSL collection except the ones starting explicitely with the non-secure "http://"?