KamoCRM

Add Accept+XHR headers and raw-string response parsing for token endpoint

FixVOIPService
Shipped
26 ஏப்ரல், 2026 அன்று 2:49 AM UTC
Author
Kamo
Commit
7cbfc82

FreePBX was returning text/html when called via cluster DNS because the Host header didn't match the configured PBX_HOSTNAME. Adding Accept: application/json and X-Requested-With: XMLHttpRequest tells FreePBX to return JSON errors instead of redirecting to an HTML page. Switched from ResponseEntity<JsonNode> to ResponseEntity<String> with manual objectMapper.readTree() so non-JSON responses produce a clear diagnostic log line instead of an opaque HttpMessageConverter exception.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing