今天,一群前端同事围着我,让我这个“前端大佬”解决跨域的问题,我也是前端。 我紧张的要命。
浏览器里接口请求不通,如下报错:
Access to fetch at 'https://cmps.test.ceenk.com:9001/mgw.htm' from origin 'http://111.205.51.131:8876' 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.
请问,我有办法解决吗?
另外问一下,跨域问题是否与前端有关系?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…