KamoCRM

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

FixVOIPService
Ya
26 Aprili 2026, 02:49 UTC
Mwandishi
Kamo
Ahadi ya
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.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila kitu kinaingia kwenye tovuti yako mwenyewe. Anza kwenye mpango wa bure na usome ukurasa huu tena katika mwezi mmoja.

Kuwa Huru MileleMtazamo wa bei