Skip to content
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

Reverse proxy port problem #28

Open
uhi67 opened this issue Nov 7, 2020 · 0 comments
Open

Reverse proxy port problem #28

uhi67 opened this issue Nov 7, 2020 · 0 comments

Comments

@uhi67
Copy link

uhi67 commented Nov 7, 2020

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'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant