mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
Console: refresh on status page set to 5s; add server header response
This commit is contained in:
parent
d1ab16f70a
commit
46c9fcce64
1 changed files with 4 additions and 2 deletions
|
@ -1809,7 +1809,8 @@ namespace http {
|
||||||
ShowPageHead (s);
|
ShowPageHead (s);
|
||||||
if (req.uri.find("summary") != std::string::npos ||
|
if (req.uri.find("summary") != std::string::npos ||
|
||||||
req.uri.find("commands") != std::string::npos ||
|
req.uri.find("commands") != std::string::npos ||
|
||||||
(req.uri.find("local_destinations") != std::string::npos && req.uri.find("b32") == std::string::npos))
|
(req.uri.find("local_destinations") != std::string::npos &&
|
||||||
|
req.uri.find("b32") == std::string::npos))
|
||||||
res.add_header("Refresh", "10");
|
res.add_header("Refresh", "10");
|
||||||
if (req.uri.find("page=") != std::string::npos) {
|
if (req.uri.find("page=") != std::string::npos) {
|
||||||
HandlePage (req, res, s);
|
HandlePage (req, res, s);
|
||||||
|
@ -1817,7 +1818,7 @@ namespace http {
|
||||||
HandleCommand (req, res, s);
|
HandleCommand (req, res, s);
|
||||||
} else {
|
} else {
|
||||||
ShowStatus (s, true, i2p::http::OutputFormatEnum::forWebConsole);
|
ShowStatus (s, true, i2p::http::OutputFormatEnum::forWebConsole);
|
||||||
res.add_header("Refresh", "10");
|
res.add_header("Refresh", "5");
|
||||||
}
|
}
|
||||||
ShowPageTail (s);
|
ShowPageTail (s);
|
||||||
|
|
||||||
|
@ -2114,6 +2115,7 @@ namespace http {
|
||||||
reply.add_header("X-Content-Type-Options", "nosniff");
|
reply.add_header("X-Content-Type-Options", "nosniff");
|
||||||
reply.add_header("X-XSS-Protection", "1; mode=block");
|
reply.add_header("X-XSS-Protection", "1; mode=block");
|
||||||
reply.add_header("Content-Type", "text/html");
|
reply.add_header("Content-Type", "text/html");
|
||||||
|
reply.add_header("Server", "i2pd " VERSION " webconsole" );
|
||||||
reply.body = content;
|
reply.body = content;
|
||||||
|
|
||||||
m_SendBuffer = reply.to_string();
|
m_SendBuffer = reply.to_string();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue