Open uhi67 opened 4 years ago
If we are behind a reverse proxy which terminates ssl and converts port to another, it generates bad redirect url back to the moodle after login. The bad url contains an extra ':80' postfix after hostname.
moodle version: 3.9.2 moodle-saml-auth version: master d02f2f5
Suggested workaround (tested): A single line inserted into index.php at line 31:
if(isset($_SERVER['HTTP_X_FORWARDED_PORT'])) $_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
If we are behind a reverse proxy which terminates ssl and converts port to another, it generates bad redirect url back to the moodle after login. The bad url contains an extra ':80' postfix after hostname.
moodle version: 3.9.2 moodle-saml-auth version: master d02f2f5
Suggested workaround (tested): A single line inserted into index.php at line 31:
if(isset($_SERVER['HTTP_X_FORWARDED_PORT'])) $_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];