CORS exception on API post requests

Trying to follow the example here:
and trigger a new job via a post request, through a small internal browser based app.

Here’s how I’m calling it:

The url is just like, with a build_param: { CIRCLE_ JOB: ‘rollback’}`

Here’s the error in the browser:

Access to XMLHttpRequest at ‘url’ from origin ‘http://localhost:8081’ 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 I do this via postman, it works fine.

This runs directly in the browser

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