mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-24332 fixed https handling when using sslproxy - thanks djeeg
This commit is contained in:
parent
bc31625aba
commit
56048f8366
@ -583,9 +583,14 @@ function initialise_fullme() {
|
||||
// $CFG->sslproxy specifies if external SSL appliance is used
|
||||
// (That is, the Moodle server uses http, with an external box translating everything to https).
|
||||
if (empty($CFG->sslproxy)) {
|
||||
if ($rurl['scheme'] == 'http' and $wwwroot['scheme'] == 'https') {
|
||||
if ($rurl['scheme'] === 'http' and $wwwroot['scheme'] === 'https') {
|
||||
print_error('sslonlyaccess', 'error');
|
||||
}
|
||||
} else {
|
||||
if ($wwwroot['scheme'] !== 'https') {
|
||||
throw new coding_exception('Must use https address in wwwroot when ssl proxy enabled!');
|
||||
}
|
||||
$rurl['scheme'] === 'https'; // make moodle believe it runs on https, squid or something else it doing it
|
||||
}
|
||||
|
||||
// $CFG->reverseproxy specifies if reverse proxy server used.
|
||||
|
Loading…
x
Reference in New Issue
Block a user