apache设置跨域请求

80>
    DocumentRoot /data/www/test
    ServerName test.com
Header set Access-Control-Allow-Origin *
Header set Access-Control-Allow-Credentials true
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
    
        Options FollowSymLinks ExecCGI Indexes
        AllowOverride All
        Order allow,deny
        Allow from all
    

 在 httpd-vhosts.conf  添加

 

Header set Access-Control-Allow-Origin *
Header set Access-Control-Allow-Credentials true
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"

 

 

  扫二维码,关注更多PHP资讯!

apache设置跨域请求_第1张图片

 

转载于:https://www.cnblogs.com/zhangzhijian/p/11165252.html

你可能感兴趣的:(apache设置跨域请求)