mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-08 07:45:46 +00:00
Fix basic auth
This commit is contained in:
@@ -18,7 +18,8 @@ namespace Tesses::Framework::Http {
|
|||||||
if(!GetCreds(ctx,user,pass) || !this->authorization(user,pass)) {
|
if(!GetCreds(ctx,user,pass) || !this->authorization(user,pass)) {
|
||||||
ctx.responseHeaders.SetValue("WWW-Authenticate",www_authenticate);
|
ctx.responseHeaders.SetValue("WWW-Authenticate",www_authenticate);
|
||||||
ctx.statusCode = Unauthorized;
|
ctx.statusCode = Unauthorized;
|
||||||
return false;
|
ctx.WithMimeType("text/html").SendText("<h1>Unauthorized</h1>");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->server)
|
if(this->server)
|
||||||
|
|||||||
Reference in New Issue
Block a user