Access-Control-Allow-Origin仍可访问wamp

时间:2018-06-05 22:19:56

标签: apache cors wamp

我安装了wamp server 3xx。 Apache标头模块已启用。 有一个本地站点:www / localsite /

 .htaccess
 AddDefaultCharset UTF-8
 <IfModule mod_headers.c>
 Header add Access-Control-Allow-Origin "site.com"
 </IfModule>  

如果我发送来自 anothersite.com 的请求,我会在控制台收到警告,说明来源不同,但我的脚本仍会触发。 除 site.com

外,我如何禁止任何请求

0 个答案:

没有答案
相关问题