SachinyadavAug20 commented on PR #77368: URL: https://github.com/apache/airflow/pull/77368#issuecomment-7187173771
Thanks a lot for the quick review and great catch, @baptistegh! 🙏 I have pushed an update addressing all your feedback: - **HTTP Reverse Proxy Port Handling:** In `_prepare_request()`, added `elif parsed.scheme == "http": server_port = 80`. When `base_url` is an HTTP scheme without an explicit port (default port 80), `server_port` previously defaulted to `request.url.port`, which caused `python3-saml` to append internal reverse-proxy ports (such as `:8080`) to the callback URL. - **Added Test Case:** Added the test case with `base_url="http://airflow.example.com"` and request port `8080`, expecting `http_host == "airflow.example.com"`, `server_port == 80`, and `https == "off"`. - **Mock Typing:** Updated to `mock_request = Mock(spec=Request)`. All 45 unit tests in `test_login.py` and all `prek` static checks (ruff, mypy) pass cleanly locally. Whenever a committer has a moment, could we please get CI workflow approval to run the checks? Thank you! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
