Access-Control-Allow-Origin多个来源IP

时间:2017-11-16 12:42:44

标签: apache

apache问题2.2.15

我已阅读了几篇帖子,但我无法找到解决问题的方法:

conf.inc for grafana dashboard

<Location /grafana/dashboard/db/smart-meter-fault-management/>
  Header always set Access-Control-Allow-Credentials true
  Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
  Header always set Access-Control-Max-Age "1000"
  Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
  Header always append Access-Control-Allow-Origin: "http://10.17.52.50:18080"
  Header always append Access-Control-Allow-Origin: "http://10.17.62.50:18080"
#  Header add Access-Control-Allow-Origin: "172.20.16.140"
  Order deny,allow
  Deny from all
  Allow from 10.17.52.50
  Allow from 10.17.62.50
  Allow from 10.17.62.150
  Allow from 10.17.62.250
  Allow from 10.17.72.50
  Allow from 10.17.72.150
  Allow from 10.17.72.250
  Allow from 172.19.24.88
  Allow from 172.20.6.140
</Location>

客户端错误

&#39; Access-Control-Allow-Origin&#39;标头包含多个值&#39; http://10.17.52.50:18080http://10.17.62.50:18080&#39;, 但只允许一个。起源&#39; http://10.17.52.50:18080&#39;因此不允许访问。

我见过

Access-Control-Allow-Origin Multiple Origin Domains?

但我怎么能用ip而不是域来处理呢?

问候

0 个答案:

没有答案