having CORS issue during chat API

1 댓글

  • Arpan Nagdeve
    Zendesk Product Manager

     We looked a bit further into the problem and it seems Access-Control-* headers were been added that's causing the failure. Is there any specific reason for adding these headers given our API documentation has no mention of these headers? 

    var WebSocket = require('ws');
           var ws_client = new WebSocket(
             'wss://rtm.zopim.com/stream', {
               headers: {
                 'Authorization': 'Bearer  {Auto_token}' ,
                 'Access-Control-Allow-Origin': '*' ,
                 'Access-Control-Allow-Headers': 'Origin, Content-Type, X-Auth-Token',
                 'Access-Control-Allow-Credentials': 'true'

댓글을 남기려면 로그인하세요.

Zendesk 제공