# CORS in the Whiteboard

**URL:** <https://devforum.zoom.us/t/cors-in-the-whiteboard/99115>\
**Category:** Web\
**Created:** [November 28, 2023, 1:04am UTC](https://devforum.zoom.us/t/cors-in-the-whiteboard/99115 "2023-11-28T01:04:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcsandrade](https://avatars.discourse-cdn.com/v4/letter/l/50afbb/32.png) [@lcsandrade](https://devforum.zoom.us/u/lcsandrade)\
**Post date:** [November 28, 2023, 1:04am UTC](https://devforum.zoom.us/t/cors-in-the-whiteboard/99115/1 "2023-11-28T01:04:40Z")

</div>

**Meeting SDK Type and Version**  
Zoom Meeting SDK Web. Version 2.18.0

**Description**  
I am having some CORS errors when using the Whiteboard. Whenever I start a new Whiteboard I get an “setting” CORS error, that doesn’t seen to affect anything, but whenever I make a comment I get another error and my comment doesn’t show up.

**Error?**  
After making the comment I get a toast with the following message:  
“A server error occurred. Try again later or if error persists, Contact Us for help.”

In the console:

Access to fetch at ‘[https://us05nws.zoom.us/nws/das/api/v1/documents/feature/setting](https://us05nws.zoom.us/nws/das/api/v1/documents/feature/setting)’ from origin ‘’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

After disabling CORS (I tested using the Allow CORS extension)  
Access to fetch at ‘[https://us05nws.zoom.us/nws/das/api/v1/documents/l\_uOFCiQTbSpTsWPWDYfJw/pages/5755738980352/comments](https://us05nws.zoom.us/nws/das/api/v1/documents/l_uOFCiQTbSpTsWPWDYfJw/pages/5755738980352/comments)’ from origin ‘’ has been blocked by CORS policy: Request header field zm-scenario is not allowed by Access-Control-Allow-Headers in preflight response.

The setting error is pretty similar.

**Troubleshooting Routes**

- Include header Access-Control-Allow-Origin: “\*”
- Turn off CORS completely
- Add my ngrok redirect URL in the Allow List

**How To Reproduce**

1. Create and join a meeting
2. Start Whiteboard
3. Make a comment

---

<div class="post-metadata">

**Author:** ![imdadpg](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imdadpg/32/54165_2.png) [@imdadpg](https://devforum.zoom.us/u/imdadpg)\
**Post date:** [November 30, 2023, 4:36pm UTC](https://devforum.zoom.us/t/cors-in-the-whiteboard/99115/4 "2023-11-30T16:36:33Z")

</div>

!

ChatGPT

Cross-Origin Resource Sharing (CORS) is a security feature implemented by web browsers to control how web pages in one domain can request and interact with resources from another domain. It is designed to prevent potentially unsafe cross-origin requests.

In the context of a whiteboard application or any web application, if you are facing CORS issues, it means that the web page is trying to make requests to a different domain than the one that served the web page, and the server is not configured to allow these requests.

Here are some general steps you can take to address CORS issues in a whiteboard application:

1. **Server Configuration:**

- Ensure that the server hosting the whiteboard application includes the appropriate CORS headers in its responses. These headers typically include `Access-Control-Allow-Origin`, `Access-Control-Allow-Methods`, and others.
- Example in Node.js using Express:

javascriptCopy code

```auto
const express = require('express');
const app = express();

app.use((req, res, next) => {
  res.header('Access-Control-Allow-Origin', '*');
  res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
  res.header('Access-Control-Allow-Headers', 'Content-Type');
  next();
});

// Your routes and middleware here

app.listen(3000, () => {

```

---

<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:** [December 31, 2023, 2:37am UTC](https://devforum.zoom.us/t/cors-in-the-whiteboard/99115/5 "2023-12-31T02:37:24Z")

</div>

Closed on December 31, 2023, 2:37am UTC

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