# Web SDK CORS Issue (Laravel Echo)

**URL:** <https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950>\
**Category:** Web\
**Created:** [August 12, 2020, 3:31pm UTC](https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950 "2020-08-12T15:31:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexmayo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexmayo/32/27289_2.png) [@alexmayo](https://devforum.zoom.us/u/alexmayo)\
**Post date:** [August 12, 2020, 3:31pm UTC](https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950/1 "2020-08-12T15:31:46Z")

</div>

Hi,

We are creating a virtual event platform and would like to integrate the Zoom Web SDK into our webpage. I am successfully generating a signature via PHP and initialising Zoom, however when attempting to join meetings I am receiving CORS errors. We **do not** use node as a backend, and I am seeing conflicting posts about whether we can or cannot join meetings on the client side? I don’t see why it would be an issue doing it all client side, especially if signatures are being generated on the backend.

Thanks,  
Alex

**Error**  
Joining meeting timeout. Could not connect to Web Server error.  
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at [https://rwcff.cloud.zoom.us/wc/ping/[...]](https://rwcff.cloud.zoom.us/wc/ping/%5B...%5D). (Reason: header ‘x-socket-id’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).

**File Versions**  
[https://source.zoom.us/zoom-meeting-1.7.9.min.js](https://source.zoom.us/zoom-meeting-1.7.9.min.js)

**Screenshots**

 ![Screenshot 2020-08-12 at 16.26.39](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/5/54c297f057ab4c9ee216fc139f6a592d44ac2653.png)

---

<div class="post-metadata">

**Author:** ![alexmayo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexmayo/32/27289_2.png) [@alexmayo](https://devforum.zoom.us/u/alexmayo)\
**Post date:** [August 12, 2020, 5:02pm UTC](https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950/2 "2020-08-12T17:02:54Z")

</div>

Okay, problem solved! It turns out that Laravel Echo forces some headers on all Ajax requests, so I followed a little workaround here which completely resolved my issue.

> <https://github.com/laravel/echo/issues/152#issuecomment-352808629>
>
> Why is the X-Socket-Id set per default?
> This causes a shitload of problems with most API's and it would be more beneficial...

I simply added the below statement after instantiating Laravel Echo.

```
//Instantiate Echo as normal
var echo = new Echo({...});

//Clear the headers that Echo sets
$.ajaxSetup({
    beforeSend: function() {}
});

//Continue with Zoom Web SDK...
```

---

<div class="post-metadata">

**Author:** ![alexmayo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexmayo/32/27289_2.png) [@alexmayo](https://devforum.zoom.us/u/alexmayo)\
**Post date:** [August 12, 2020, 5:06pm UTC](https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950/3 "2020-08-12T17:06:26Z")

</div>

@tommy would it be worth mentioning this on the documentation somewhere, maybe add a CORS section on the Web SDK page with common issues and fixes, I have seen quite a few people with these issues so it would be good to have the solutions consolidated somewhere…

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 12, 2020, 5:31pm UTC](https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950/4 "2020-08-12T17:31:44Z")

</div>

Hey @alexmayo,

Glad to hear you got it sorted out! Thanks for the suggestion too, we will look into adding a CORs errors section to our Web SDK. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 12, 2020, 3:31am UTC](https://devforum.zoom.us/t/web-sdk-cors-issue-laravel-echo/26950/5 "2020-09-12T03:31:53Z")

</div>

Closed on September 12, 2020, 3:31am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
