warmp Apache 403 forbidden No 'Access-Control-Allow-Origin' header is present on the requested r...

这几天在自己电脑上搭个后台,之前遇到的问题又重新搞一遍,这次记录一下,也方便大家.

403 forbidden:

本地电脑可以访问,同局域网的手机访问不到,查了80,关了防火墙,依然不行,重要找到一遍合适的博客解决,原址:

https://blog.csdn.net/wangqiuchen_study/article/details/65443388。

修改 http.conf文件

将onlineoffline tag - don’t remove,下一行的 Require local替换为Require all granted;

跨域:客户端连接请求时提示No 'Access-Control-Allow-Origin' header is present on the requested resource

在php 文件头部添加:header('Access-Control-Allow-Origin:*');

你可能感兴趣的:(warmp Apache 403 forbidden No 'Access-Control-Allow-Origin' header is present on the requested r...)