• Richard Mason
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
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.
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.