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
lvqibin123 opened this issue Sep 2, 2021 · 4 comments
Open

前后端分离这个接口访问不了 #6

lvqibin123 opened this issue Sep 2, 2021 · 4 comments

Comments

@lvqibin123
Copy link

lvqibin123 commented Sep 2, 2021

http://192.168.31.188:8000/ueditor/index?action=config&callback=bd__editor__yv0ff
QQ截图20210902170938
能正常返回结果
前端访问时候出错,其它接口能正常访问,请问这个要怎么处理了。

Cross-Origin Read Blocking (CORB) blocked cross-origin response http://192.168.31.188:8000/ueditor/index?action=config&callback=bd__editor__5rjgjj with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.

@hbh112233abc
Copy link
Owner

需要支持跨域访问才行,tp6可以开启跨域中间件哦

@lvqibin123
Copy link
Author

我确定跨域已经开启了,不然其他接口不可能正常访问了
1
2
我配置其他java项目的url就能正常使用了
3
http://localhost:8000/ueditor/demo/view
这个可以正常访问了
4
请问我需要什么配置吗

@hbh112233abc
Copy link
Owner

我已经加入跨域请求中间件了, 最新版本1.2.5应该可以了哦,你可以更新试试

@lvqibin123
Copy link
Author

我对源码进行了修改之后就可以了
4
经过上面的修改解决了跨域问题
2
3
但是php本地访问就会有问题了
我有没有好的办法了

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