YunoHost-Apps / adguardhome_ynh

AdGuard Home package for YunoHost: Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
14 stars 12 forks source link

when AGH not in Visitor group and user not connected, AGH doesn't display the login page #144

Closed OniriCorpe closed 6 months ago

OniriCorpe commented 6 months ago

Describe the bug

when AdGuard Home is not authorized for the Visitors group, it never automatically displays the login page, whereas it does if it's authorized for the Visitors group if the user go manually to the login.html page, they can login and use their AGH as usual as long as the user doesn't log out, no problem

this bug is not present with 0.107.42~ynh1 so it seems related to #143, who fixes:

when adguard home is not enabled in the visitor group, the API is SSOed

maybe I miss something, but I tested many things to try to fix this

Context

Steps to reproduce

Expected behavior

whether AGH is open to visitors or not, it should redirect the user to the login.html page if not connected

Logs

there is no error at all in the AGH logs, but one GET https://adguard.example.com/control/status 403 Forbidden per second in the console

OniriCorpe commented 6 months ago

I edited api.auth_header from false to true and it's fixed api.auth_header = true

how to spend 2 hours for nothing sighhhhh