Fix basic auth

This commit is contained in:
2025-12-04 14:29:04 -06:00
parent 2861fba6f2
commit b243b1c88d

View File

@@ -18,7 +18,8 @@ namespace Tesses::Framework::Http {
if(!GetCreds(ctx,user,pass) || !this->authorization(user,pass)) {
ctx.responseHeaders.SetValue("WWW-Authenticate",www_authenticate);
ctx.statusCode = Unauthorized;
return false;
ctx.WithMimeType("text/html").SendText("<h1>Unauthorized</h1>");
return true;
}
if(this->server)