mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Renamed the HTTP Basic auth realm to something more informative.
This commit is contained in:
parent
0a6a3a0a9a
commit
7eb80e9916
6
httpd.c
6
httpd.c
@ -250,8 +250,10 @@ void httpd_connection(FILE *f)
|
||||
if (status == 303)
|
||||
headers = xs_dict_append(headers, "location", body);
|
||||
|
||||
if (status == 401)
|
||||
headers = xs_dict_append(headers, "WWW-Authenticate", "Basic realm=\"IDENTIFY\"");
|
||||
if (status == 401) {
|
||||
xs *www_auth = xs_fmt("Basic realm=\"%s snac login", xs_dict_get(srv_config, "host"));
|
||||
headers = xs_dict_append(headers, "WWW-Authenticate", www_auth);
|
||||
}
|
||||
|
||||
if (ctype == NULL)
|
||||
ctype = "text/html; charset=utf-8";
|
||||
|
Loading…
Reference in New Issue
Block a user