pmm
pmm copied to clipboard
fix: infer HTTPS scheme for ports 443 and 8443 in external services
PMM-4935 Link to the Feature Build: SUBMODULES-0
Problem
When adding an external service with HTTPS scheme via the UI, the connection check was still using HTTP, resulting in a 400 Bad Request error.
Solution
Modified CreateExternalExporter in managed/models/agent_helpers.go to automatically infer the HTTPS scheme when the listen port is 443 or 8443, instead of always defaulting to HTTP when no scheme is explicitly provided.
Changes
- Updated scheme inference logic to detect common HTTPS ports (443, 8443)
- Added test cases for the new behavior
If this PR adds, removes or alters one or more API endpoints, please review and add or update the relevant API documentation as well:
- [x] API Docs updated (no API changes, only internal logic is fixed)