Skip to main content

I'm trying to use the Live Agent REST API but I'm bumping into CORS issue. The AJAX request:

$.ajax({

type: "GET",

url: LiveAgent._Url + "/System/SessionId",

headers: {

"X-LIVEAGENT-AFFINITY": "null",

"X-LIVEAGENT-API-VERSION": 35,

},

success: LiveAgent.ChasitorInit

})

This results in a preflight (OPTIONS) HTTP request with the following headers:

Access-Control-Request-Method: GET

Access-Control-Request-Headers: x-liveagent-affinity,x-liveagent-api-version

Origin: https://mylocaltest.com

But the response headers only have:

Access-Control-Allow-Origin: https://mylocaltest.com

Access-Control-Allow-Credentials: true

It is missing the Access-Control-Allow-Headers header.
8 answers
  1. May 12, 2016, 5:12 PM
    Hi,

    I have the same issues, did you guys came up with any solution?