Protocol-relative urls are not working anymore in 2.5.9
Closed this issue · 1 comments
pqml commented
Since 2.5.9, protocol-relative urls starting with a double slash seems to not work anymore: I can't access the panel when I'm not logged in.
Working from a proxy, I usually set my baseurl through this, without any problem in 2.5.8:
c::set('url', '//' . $_SERVER['HTTP_X_FORWARDED_HOST']);
It works in 2.5.9 only if I explicit the protocol
c::set('url', 'http://' . $_SERVER['HTTP_X_FORWARDED_HOST']);
Can this commit be the source of this issue?
dfd7c93
lukasbestle commented
I don't think so, but we will fix this issue in the next release.
Maybe (depending on your exact setup) you can use something like this in the meantime?
c::set('url', $_SERVER['HTTP_X_FORWARDED_PROTO'] . '://' . $_SERVER['HTTP_X_FORWARDED_HOST']);