eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
361 stars 119 forks source link

Add logout (sign out) link on the page when using Apache htpasswd authentication #227

Open 2mstorm opened 1 year ago

2mstorm commented 1 year ago

Is your feature request related to a problem? Please describe. When I use htpasswd authentication in Apache to protect AWStats report so it requires password, there is no easy way to log out

Describe the solution you'd like I found that in order to log out in this case I have to visit link http://logout:logout@example.com/ where example.com would be replaced by the domain the awstats is setup on. This is based on (https://stackoverflow.com/questions/1163868/how-to-logout-when-using-htaccess-and-htpasswd-authentication)

It would be nice if the link http://logout:logout@example.com/ is included on the AWStats report page under Sign Out, (like Sign Out) and then the users can turn on and off option to show link in the config for the AWStats for that domain

I made this work by editing awstats.pl file and adding the line print "<a href=\"https://logout:logout\@mydomain.com/awstats/awstats.pl\">Sign Out"; in the HTMLTopBanner function When I click on the link, my browser forgets the username and password I used to authenticate