Loading assets cross-domain with SSL or non-SSL option Here's a unique situation. I have three websites. All assets are stored at the domain of the first site:
domain.com/files/*
The first two sites run completely over SSL. No problem.
The third site needs to have the option to load either over SSL or non-SSL. This is entirely thanks to the authoritarian governments of countries like China, which may block a site, no matter the content, if it can only load over SSL.
In my config.php, I have this:
'@assetBaseUrl' =&gt; 'https://site1.domain.org/files'

If I change this to exclude https://, Craft does not create proper URLs for images and files. I also tried //site1.domain.org, but that doesn't work either.
Is there some setting I can use for @assetBaseUrl that will work across the board?
You could try something like '@assetBaseUrl' =&gt; $_SERVER['HTTPS'] ? 'https://site1.domain.org/files' : 'http://site1.domain.org/files' which checks for a secure request.