Open T1loc opened 4 years ago
Hi @T1loc :) yes.. it's can be a useful feature. Something like this? $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $s = ($CFG["https_enforce"]) ? $_SERVER["HTTPS"] : $s ;
It's ok?
HI @tematres, I don't think so.
For some use case you have this :
client <-https-> loadbalancer <-http-> webserver(s)
When you use $_SERVER["HTTPS"]
on tematres code you check the second one so it will be always http.
If we want to enforce I'll more use something like that:
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
$s = ($CFG["https_enforce"]) ? "s" : $s ;
Hello,
Since I use tematres with docker, behind an ingress controller (Nginx Loadbalancer) the function getURLBase is not working as expected because the protocal between my loadbalancer and the docker image is http.
So we have now some mixt-content blocked by browsers.
What do you think about adding an entry into the config.tematres.php ? Like :
CFG["https_enforce"] = true | default to false
And then adapt this piece of code :