简体   繁体   English

跨域请求错误

[英]cross-origin request ERROR

When I use axios to send a XMLHttpRequest, it occurs. 当我使用axios发送XMLHttpRequest时,它发生了。

error: XMLHttpRequest cannot load https://nuxt-auth-routes.glitch.me/api/login . 错误:XMLHttpRequest无法加载https://nuxt-auth-routes.glitch.me/api/login Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. 对预检请求的响应未通过访问控制检查:请求的资源上不存在“ Access-Control-Allow-Origin”标头。 Origin ' http://localhost:3000 ' is therefore not allowed access. 因此,不允许访问源' http:// localhost:3000 '。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM