Skip to content

Commit

Permalink
Improve status page
Browse files Browse the repository at this point in the history
  • Loading branch information
petertodd committed Feb 22, 2025
1 parent 661f9fa commit 20c95be
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ use http::status::StatusCode;
use crate::aggregator::StampRequest;

fn do_get_root(our_name: String, upstream_name: String) -> Response<Full<Bytes>> {
let our_version = env!("CARGO_PKG_VERSION");
let body = format!(
"<html>
<head>
<title>OpenTimestamps Aggregator</title>
<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\">
</head>
<body>
This is the <a href=\"https://opentimestamps.org\">OpenTimestamps</a> aggregator {}, aggregating timestamp requests for the upstream calendar server {}
<p>This is the <a href=\"https://github.com/opentimestamps/foxglove\">Foxglove</a> (v{our_version})
<a href=\"https://opentimestamps.org\">OpenTimestamps</a> aggregator {our_name}, aggregating timestamp
requests for the upstream calendar server <a href=\"{upstream_name}\">{upstream_name}</a>.</p>
</body>
</html>
",
our_name,
upstream_name
);
");

Response::builder()
.status(StatusCode::OK)
.header(http::header::CONTENT_TYPE, "text/html")
Expand Down

0 comments on commit 20c95be

Please sign in to comment.