Score:0

Nginx 403 forbidden on static files using link_secure with grafana

cn flag

I am trying to configure auto login using nginx as auth proxy, I am successfully able to authenticate but my problem comes when grafana loads all static files are 401.

my nginx configuration

#i also tried /grafana by enabling it in the grafana.ini

  location / {
        secure_link $arg_md5,$arg_expires;
        secure_link_md5 "$secure_link_expires$uri enigma";
        if ($secure_link = "") { return 403; }
        if ($secure_link = "0") { return 410; }
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Session-Token $http_x_session_token;
        proxy_set_header X-WEBAUTH-USER $arg_user;
        proxy_set_header Authorization "";
        #rewrite ^/auth(.*)$ /$1;       
                            
    }

401 errors

as you can see all of resources are 401 below is link that i use for authentication

http://localhost/?md5=JSyq8fW04y5L7Khd0BoZ9g&expires=1686614400&user=admin
djdomi avatar
za flag
please see [ask] as also there is a [manual](https://grafana.com/tutorials/run-grafana-behind-a-proxy/) from grafana
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.