ProcessWire-AIOM-All-In-One-Minify icon indicating copy to clipboard operation
ProcessWire-AIOM-All-In-One-Minify copied to clipboard

domain sharding not working over https

Open yashilanka opened this issue 7 years ago • 2 comments

hi i just install new ssl to my site and sub domain, and then i activate domain sharding option change url to https subdomain and then i clear all the template cache, module cache, compile files but https domain sharding url not printing. the module only print http domain sharding url not https, how can i solve this.

yashilanka avatar Sep 04 '16 14:09 yashilanka

Same problem for me. Looks like the SSL-option is just ignored. The option without ssl is working just fine.

dennisspohr avatar Jul 13 '17 14:07 dennisspohr

same here.

EDIT Okay, I had a quick look into the source code. The problem is this: AIOM only uses the https url when it thinks it's necessary. And this is checked using the $page->template->https field. So this ssl sharding only works for pages which use a template with a https setting.

So on pages, like mine, where the https setting is made for the whole domain, this will not work. You could either change all template settings to 'HTTPS only' or maybe change the code inside protected static function CheckSSL($event) to also check for $config->https, which uses the url schema to determine if https is used.

Though, there might occur some problems if the page is not only accessed via https but also via unsecure connections, there is also a non-https sharding url, and the AIOM output is somehow cached. Because a browser connecting via https won't load non-https resources, which would be delivered from cache created by a non-https visit.

janKir avatar Sep 28 '17 08:09 janKir