Page 1 of 1

undocumented config variable?

Posted: Thu Oct 28, 2021 3:40 am
by rotezecke
Long story short: $config['ssl_uploads_url'] is not documented as far as I can tell. But maybe that's because you should not set it?

--

I have a website that is installed on multiple servers, only difference is the config.php file. This is how I test updates, etc. The introduction of SmartImage caused some issues on all my servers as src="/uploads.." is not supperted. also described here viewtopic.php?f=7&t=82989

I then started using {uploads_url} as suggested by Digi. Today I realised that this does not work on my test server, as SmartImage refuses to output anything with a self-signed certificate. I then set $config['uploads_url'] as http://... but that still failed.

I finally found the method in class.cms_config which checks how the request is made, and if the request comes via https, it returns ssl_uploads_url.

So, by setting
$config['ssl_uploads_url'] = 'http://...';
in my test environment, I managed to get it to work.

Re: undocumented config variable?

Posted: Thu Oct 28, 2021 2:33 pm
by DIGI3
the ssl-specific config entries were from when it was common to have ssl applied to only parts of the site - a purchase page, for example. Since there's no practical purpose for that now, these parameters and the individual-page ssl setting have been long deprecated but not yet removed.

Your situation might be a use case for leaving some of that functionality in, but it might also work by just forcing http and not https in your htaccess when there's no signed certificate available. I do this when upgrading very old 1.x sites that have mixed content issues in admin so I can at least log in.