i am trying to access the API of my jenkins server through a javascript application to get some build data. When trying to make the request, i get a CORS error, despite me having the CORS plugin enabled for jenkins
Here is the error i get in the console Access to fetch at (my_jenkins_server) from origin 'http://localhost:3000' 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.
In the fetch i include the following headers:
headers: new Headers({ 'Content-Type': 'application/json', 'Authorization': 'Basic ' + btoa('jenkin_user:jenkin_token')
And this is the current setting for my CORS plugin here
Similar to this question here Jenkins CORS Filter plugin not adding Access-Control-Allow-Origins header