3

cors problem with apache 2.2.15

i've read serveral posts but i can't find a solution for my problem:

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>

error on client

The 'Access-Control-Allow-Origin' header contains multiple values 'http://10.17.52.50:18080, http://10.17.62.50:18080', but only one is allowed. Origin 'http://10.17.52.50:18080' is therefore not allowed access.

i've seen

Access-Control-Allow-Origin Multiple Origin Domains?

but how can i handle this with ip and not with domain?

regards

  • 1
    Possible duplicate of [Access-Control-Allow-Origin Multiple Origin Domains?](https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains) – Quentin Mar 11 '19 at 14:36
  • 1
    "but how can i handle this with ip and not with domain?" — The same way! – Quentin Mar 11 '19 at 14:36

0 Answers0