How to display a panel in my page or PHP framework?

I want to create a PHP app that contains embedded panel or dashboard.

My problem comes when it comes to showing the panels with authentication by the server

If in the configuration I put “X-WEBAUTH-USER myUser” it logged me but it redirects me to grafana and if I do it by javascript it does not work

<iframe width="100%" height="100%" id="dashboard"></iframe>

<script type="text/javascript">

    $(document).ready(function () {

                type: 'GET',
                url: 'http://grafana.local/grafana/',
                contentType: 'application/json',
                crossDomain: true,
                headers: {
                    'X-WEBAUTH-USER': 'admin',
                success: function (data) {

                    $('#dashboard').attr('src', 'http://grafana.local/grafana/d/o24Kt1Cik/dashboard-de-pruebas?orgId=1');
                error: function (data) {

                    console.log("error al actualiza ")


How can i do it? (The reverse proxy works perfectly)

I read it: