|
|
@ -738,6 +738,8 @@ namespace http { |
|
|
|
std::string content; |
|
|
|
std::string content; |
|
|
|
HTTPRes res; |
|
|
|
HTTPRes res; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LogPrint(eLogDebug, "HTTPServer: request: ", req.uri); |
|
|
|
|
|
|
|
|
|
|
|
if (needAuth && !CheckAuth(req)) { |
|
|
|
if (needAuth && !CheckAuth(req)) { |
|
|
|
res.code = 401; |
|
|
|
res.code = 401; |
|
|
|
res.headers.insert(std::pair<std::string, std::string>("WWW-Authenticate", "Basic realm=\"WebAdmin\"")); |
|
|
|
res.headers.insert(std::pair<std::string, std::string>("WWW-Authenticate", "Basic realm=\"WebAdmin\"")); |
|
|
|