Iframe#
What is an iframe?#
An iframe (short for inline frame) is an HTML element that allows a separate HTML document to be embedded within a web page. In other words, it is a kind of ‘window’ in a web page that displays other content or a website.
Example of iframe syntax
<iframe src=‘https://www.example.com’ width=‘600’ height=‘400’></iframe>
How do you generate an iframe in GLPI?#
The most commonly used example is dashboards.
To generate an iframe for dashboards, go to
Assistance
>
Dashboards
>. Select the dashboard you want to integrate and click on
(at the top right of the screen).
In the box that opens, copy the Iframe
part and integrate the code (which should look like the code below) into your site
<iframe src=‘https://www.myinstance.com/front/central.php?embed&dashboard=central&entities_id=0&is_recursive=1&token=5b04t6hhnbf-4f70-6g12-af13-12gdefdf5v8d’ frameborder=‘0’ width=‘800’ height=‘600’ allowtransparency></iframe>
Can iframes be used with GLPI Cloud (private or public)?#
For security reasons, we do not authorise the default iframe (on the backend) for Cloud versions.
It is perfectly possible to open it, but there are several things you need to know
Danger
- This opening concerns the entirety of GLPI;
- You expose yourself to risks of phishing;
- We do not guarantee that all GLPI functionalities will work in this context;
- In an OauthSSO context, the iframe does not work.
- To limit the risks, we will ask you to provide us with the URLs in which the Frame will be integrated.
The use of iframes can expose the site to vulnerabilities if the GLPI content is not properly secured. An attacker could inject malicious code into the iframe, affecting users or compromising data.