pmm icon indicating copy to clipboard operation
pmm copied to clipboard

fix: infer HTTPS scheme for ports 443 and 8443 in external services

Open Demiserular opened this issue 10 months ago • 1 comments

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)

Demiserular avatar Jan 31 '26 09:01 Demiserular

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 05 '26 09:02 CLAassistant