# Zoom app server is blocked by CORS policy

**URL:** <https://devforum.zoom.us/t/zoom-app-server-is-blocked-by-cors-policy/97754>\
**Category:** Zoom Apps\
**Tags:** recording, api\
**Created:** [November 2, 2023, 9:33am UTC](https://devforum.zoom.us/t/zoom-app-server-is-blocked-by-cors-policy/97754 "2023-11-02T09:33:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexpandian7ks](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexpandian7ks/32/52259_2.png) [@alexpandian7ks](https://devforum.zoom.us/u/alexpandian7ks)\
**Post date:** [November 2, 2023, 9:33am UTC](https://devforum.zoom.us/t/zoom-app-server-is-blocked-by-cors-policy/97754/1 "2023-11-02T09:33:10Z")

</div>

I am trying to understand why the preflight error is coming here because my Cors code works for Google.

Access to fetch at ‘localhost: 3001/start-automation’ from origin ‘poodleaizoomapp . serveo . net’ 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.

The backend port is 3001.

Backend server code: I have added the Cors option, but it is not working. I also tried a different pktriot server, but the same issue.  
Code:

```auto
// CORS configuration
const corsOptions = {
  origin: ["poodleaizoomapp . serveo . net", "google . com"],
  allowedHeaders: ["Content-Type"],
};

// app.use(cors(corsOptions)); // Enable CORS with options

app.options(
  "/start-automation",
  (req, res, next) => {
    console.log("helo");
    next();
  },
  cors(corsOptions)
);

// WebSocket setup
app.post("/start-automation", cors(corsOptions), (req, res) => {
  const { MeetingLINK, MeetingHOST } = req.body;

  if (!MeetingLINK || !MeetingHOST) {
    return res
      .status(400)
      .json({ error: "MeetingLINK and MeetingHOST are required." });
  }

  startPlaywrightAutomation(MeetingLINK, MeetingHOST);

  return res.status(200).json({ message: "Automation started successfully." });
});

app.get("/hello", cors(corsOptions), (req, res) => {
  console.log("hello");
  res.sendStatus(200);
});
app.get("/hello", cors(corsOptions), (req, res) => {
  console.log("hello");
  res.sendStatus(200);
});

```

I have added google . com to check if my cors is working there, and it is.

fetch(‘localhost: 3001/hello’, {method: ‘GET’})

1. Promise {}

2. [[Prototype]]: Promise

```
1. catch: ƒ catch()
2. constructor: ƒ Promise()
3. finally: ƒ finally()
4. then: ƒ then()
5. Symbol(Symbol.toStringTag): "Promise"
6. [[Prototype]]: Object

```

1. [[PromiseState]]: “fulfilled”
2. [[PromiseResult]]: Response

As you can see, the cors is working for [google.com](http://google.com), but it does not work in the zoom console of poodleaizoomapp . serveo . net. The same has been blocked by CORS policy: 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.

My frontend is working in localhost:3000

```auto
Snyder>ssh -R poodleaizoomapp . serveo .net:80:local host:3000 serveo . net
Forwarding HTTP traffic from poodleaizoomapp . serveo . net

```

I need help because, currently, I need to send data from the Zoom app to my backend.

Note: I have removed HTTP because a new user in the Zoom dev forum can’t add more than two links. This is an absurd rule.

---

<div class="post-metadata">

**Author:** ![alexpandian7ks](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexpandian7ks/32/52259_2.png) [@alexpandian7ks](https://devforum.zoom.us/u/alexpandian7ks)\
**Post date:** [November 2, 2023, 9:35am UTC](https://devforum.zoom.us/t/zoom-app-server-is-blocked-by-cors-policy/97754/2 "2023-11-02T09:35:15Z")

</div>

I have not used [https://because](https://because) 2 links are only allowed in the zoom forum, and why does the platform not allow me to attach media? Due to links not allowed there is space between the dots.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [November 8, 2023, 6:36am UTC](https://devforum.zoom.us/t/zoom-app-server-is-blocked-by-cors-policy/97754/3 "2023-11-08T06:36:51Z")

</div>

@alexpandian7ks ,

Thank you for posting in the Zoom Developer Forum! Can you share if you add those domains to the Zoom Apps allow list?
