Unable to use API due to cross origin block

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
Posts: 3
Joined: Mon Apr 12, 2021 8:23 pm

Unable to use API due to cross origin block

Post by xiki » Wed Jun 02, 2021 2:51 pm

I've been trying to fix this for a while now. I have a local host, where I'm building an interface and would like to make API requests to zoneminder server, which is on another machine. Both endpoints are behind a valid SSL configuration.

I'm sending a JS fetch to https://<domain>/zm/api/host/login.json, with the appropriate user and password. This same request works fine on Insomnia ( similar to Postman ) but on my local host where I'm building the interface, the browser spits out:

Access to fetch at 'https://cams.domain1.com/zm/api/host/login.json' from origin 'https://loc.domain1.com' has been blocked by CORS policy: Request header field access-control-allow-expose-headers is not allowed by Access-Control-Allow-Headers in preflight response.

What am I missing?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests