<VirtualHost *: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" <Directory /> Options FollowSymLinks ExecCGI Indexes AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
在 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"
原文地址:https://www.cnblogs.com/zhangzhijian/p/11165252.html
时间: 2024-10-11 11:27:37