ddurieux / glpi_app_grafana

GNU Affero General Public License v3.0
23 stars 13 forks source link

Cross-Origin Request Blocked: add right headers in your apache/nginx like 'App-Token' and 'Session-Token' #59

Open alexandre-arend opened 4 years ago

alexandre-arend commented 4 years ago

Please helpme solution problem ?

iam add lines in .httpaccess, but not resolved.

Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE" Header set Access-Control-Allow-Credentials true Header set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, App-Token, Session-Token"

image

My Configuration

Token ability in GLPI setup Tokens generate in user and app GLPi verion 5.1 Ubuntu Server 20.04 LTS Grafana 7.1

tnks for help me

perlporter commented 3 years ago

The way that worked with me was to add in my httpd.conf:

<IfModule headers_module>
        Header set Access-Control-Allow-Origin "*"
        Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
        Header set Access-Control-Allow-Credentials "true"
        Header set Access-Control-Allow-Headers "Origin,Content-Type,Accept,Authorization,App-Token,Session-Token"
</IfModule>