Apache:具有Access-Control-Allow-Origin的“Header always set”和“Header set”之间的区别?

时间:2017-12-26 03:38:33

标签: apache .htaccess configuration

上下文:我想使用apache添加基于http的身份验证和对目录的跨域访问。 .htaccess 文件如:

SELECT id,
       REGEXP_REPLACE (msg_info, '(^|\s|\W)(gold)($|\s|\W)', '\1~\2\3', 1,0,'i')
FROM   yourtable;  

它正在发挥作用。但是,如果我设置

\1,\2,\3

我得到了

Header always set Access-Control-Allow-Credentials "true"
Header set Access-Control-Allow-Origin: "http://localhost:8080"
AuthName "Input Passwd!"
AuthType Basic
AuthUserFile users/user.htpasswd
require valid-user

看起来它是额外的Header always set Access-Control-Allow-Origin: "http://localhost:8080" 字符。 为什么会造成这种差异?

已在http.conf中配置The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8080, *', but only one is allowed. Origin 'http://localhost:8080' is therefore not allowed access.

0 个答案:

没有答案