-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate HTTPS/mixed content issues with F5 Load Balancer #148
Comments
To add a little more context, this issue in question was observed at https://archweb.luc.edu/guide_on_the_side/. It seems to be caused by the Configure::write('App.fullBaseUrl', "https://example.com/guide_on_the_side/"); As for the underlying cause, /**
* Full URL prefix
*/
if (!defined('FULL_BASE_URL')) {
$s = null;
if (env('HTTPS')) {
$s = 's';
}
$httpHost = env('HTTP_HOST');
if (isset($httpHost)) {
define('FULL_BASE_URL', 'http' . $s . '://' . $httpHost);
Configure::write('App.fullBaseUrl', FULL_BASE_URL);
}
unset($httpHost, $s);
}
function env($key) {
if ($key === 'HTTPS') {
if (isset($_SERVER['HTTPS'])) {
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
}
return (strpos(env('SCRIPT_URI'), 'https://') === 0);
}
... It may be worth investigate if there are any quirks around |
I figured out a way of reproducing the issue mentioned, albeit one that requires having your php.ini set up in a specific way. It involves the directive
So if you set |
It looks like this is an issue with the way F5 load balancer works. As I understand it, F5 handles all the HTTPS requests coming in and then offloads them as HTTP requests to the application servers. This causes a problem because as far as Guide on the Side knows, PHP is not using HTTPS. @caosborne89 found an article from Lullabot where they discussed inserting a special header via an iRule in F5 and then detecting that header in the application code (https://www.lullabot.com/articles/setting-up-ssl-offloading-termination-on-an-f5-bigip-load-balancer). That's something we could look into but I'd want to figure out some kind of way that we could have an F5 setup for testing purposes. It looks like AWS will offer some F5 stuff, so that could be a solution (https://aws.amazon.com/marketplace/seller-profile?id=74d946f0-fa54-4d9f-99e8-ff3bd8eb2745). |
We've gotten reports that HTTPS isn't working everywhere and people are getting mixed content errors. Find where the problems are and fix them.
The text was updated successfully, but these errors were encountered: