aixos请求时遇到错误,出现
使用axios向后台请求数据时,出现报错。错误如下:
Access to XMLHttpRequest at 'http://192.168.1.198/api/login/user' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.
出现这个错误,应该是后台的接口没有允许跨域。
HTTP访问控制(CORS) 了解