Skip to content

[FIX] Handle the case where there is a load balancer that is taking care of SSL termination, in which case SERVER_PORT can be the inside facing port which is not the external facing one. Also, HTTPS server var is often missing but there are several places

Nelson Ko requested to merge synergiq/tiki:synergiq-load-balancer-fix into master

Should go to master, 19.x and 18.x too.

[FIX] Handle the case where there is a load balancer that is taking care of SSL termination, in which case SERVER_PORT can be the inside facing port which is not the external facing one. Also, HTTPS server var is often missing but there are several places in Tiki where it checks for this, so check for REQUEST_SCHEME too. There seems to be other code in Tiki that try to handle this (imperfectly) but it is most reliable to address it as early as possible, right here.

Merge request reports