问题描述
我正在尝试通过JavaScript应用程序访问我的jenkins服务器的API,以获取一些构建数据。尝试提出请求时,尽管我为jenkins启用了CORS插件,但还是收到了CORS错误
这是我在控制台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.
中遇到的错误
headers: new Headers({ 'Content-Type': 'application/json','Authorization': 'Basic ' + btoa('jenkin_user:jenkin_token')
类似于这里的问题Jenkins CORS Filter plugin not adding Access-Control-Allow-Origins header
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)