Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrong port number behind reverse proxy? #282
I am running the apache with the mod_auth_openidc on port 80. This is running in a docker container which maps the port to port 8080. It is behind an nginx reverse proxy that terminates the HTTPS so the internal url looks as http://openid.internal.com:8080 and external url looks like https://openid.external.com.
I had the proxy pass as:
This resulted in a target_link_url sent to the discovery page as https://openid.exernal.com:80 (note the wrong calculated port). But I think that if no port came in the no port should have been added and certainly not an incorrect implied port 80.
I think the error is in the code in function "char oidc_get_current_url_port" in file mod_auth_openidc/src/util.c where it tries to get a port number.
Adding the following is the current workaround.