Code Monkey home page Code Monkey logo

Comments (8)

ddurieux avatar ddurieux commented on July 25, 2024

You put this lines into or into ?

from glpi_app_grafana.

menemat avatar menemat commented on July 25, 2024

I tried:
<Directory /var/www>
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"

but I got always the same error

from glpi_app_grafana.

menemat avatar menemat commented on July 25, 2024

/etc/apache2/sites-enabled/glpi.conf

<VirtualHost :80>
......
<Directory /var/www/glpi>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
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,$

....

a2enmod headers -> Module headers already enabled
systemctl restart apache2

glpiAPI glpigrafana glpi-TOKENgrafana glpi-TOKENuser

from glpi_app_grafana.

ddurieux avatar ddurieux commented on July 25, 2024

On grafana when you test, check the developper console (F12) to see the real error on HTTP requests

from glpi_app_grafana.

menemat avatar menemat commented on July 25, 2024

Thanks for the fast answer!

glpi-CORSerror

from glpi_app_grafana.

ddurieux avatar ddurieux commented on July 25, 2024

Ok so it's confirmed, it's CORS problem.
The error say you use https (443) but in your apache config you have so I think you don't have put the CORS configuration in the right VirtualHost/Directory

from glpi_app_grafana.

menemat avatar menemat commented on July 25, 2024

Thanks.
I put it in glpi.conf as written above.
glpi.conf is correctly linked from /sites-available
Syntax is OK

Could be a problem due by 3000 port?
There are differents apache config file to setup for https unlike http?

from glpi_app_grafana.

ddurieux avatar ddurieux commented on July 25, 2024

I don't know, depend of the package of Apache2

from glpi_app_grafana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.