mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-75371: Remove unrespectful language from code comment
https://tracker.moodle.org/browse/MDL-75371
This commit is contained in:
parent
417d1b918b
commit
42c69bd155
@ -910,9 +910,16 @@ function initialise_fullme() {
|
||||
$_SERVER['SERVER_PORT'] = 443; // Assume default ssl port for the proxy.
|
||||
}
|
||||
|
||||
// Hopefully this will stop all those "clever" admins trying to set up moodle
|
||||
// with two different addresses in intranet and Internet.
|
||||
// Port forwarding is still allowed!
|
||||
// Using Moodle in "reverse proxy" mode, it's expected that the HTTP Host Moodle receives is different
|
||||
// from the wwwroot configured host. Those URLs beeing identical could be the consequence of various
|
||||
// issues, including:
|
||||
// - Intentionally trying to setup moodle with 2 distinct addresses for intranet and Internet: this
|
||||
// configuration is unsupported and will leads to bigger problems down the road (the proper solution
|
||||
// for this is adjusting the network routes, and avoid relying on the application for network concerns).
|
||||
// - Misconfiguration of the reverse proxy that would be forwarding the Host header: while it is
|
||||
// standard in many cases that the reverse proxy would do that, in our case, the reverse proxy
|
||||
// must leave the Host header pointing to the internal name of the server.
|
||||
// Port forwarding is allowed, though.
|
||||
if (!empty($CFG->reverseproxy) && $rurl['host'] === $wwwroot['host'] && (empty($wwwroot['port']) || $rurl['port'] === $wwwroot['port'])) {
|
||||
throw new \moodle_exception('reverseproxyabused', 'error');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user