Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于本地前端调用后台接口报错跨域问题 #6

Open
joyld0712 opened this issue Apr 8, 2019 · 1 comment
Open

关于本地前端调用后台接口报错跨域问题 #6

joyld0712 opened this issue Apr 8, 2019 · 1 comment

Comments

@joyld0712
Copy link

连接浏览器就报错
Access to XMLHttpRequest at 'http://localhost/vue-admin-php/public/index.php/admin/login/out' from origin 'http://172.29.130.120:8081' 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.
请问下这是什么情况?明明都是在本地的
请求大大指点下

@lmxdawn
Copy link
Owner

lmxdawn commented Jun 20, 2019

不管是不是在本地,只要域名和端口号不一样都属于跨域。也可以去 Google 下,详细的看看跨域的解释哦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants