
Vue 项目中的跨域问题及其解决方案(涉及PHP后台)
5星
- 浏览量: 0
- 大小:None
- 文件类型:PDF
简介:
本文探讨了在基于 Vue.js 的前端项目中遇到的跨域访问难题,并结合 PHP 后端提供了一系列有效的解决策略。
问题描述:
在使用前端 Vue 框架与后台 PHP 进行跨域通信时遇到问题。根据百度的建议,在后端代码中添加了以下头部信息:
```php
header(Access-Control-Allow-Origin: *);
```
然而,执行之后收到了错误提示:
The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is include.
全部评论 (0)
还没有任何评论哟~


