tangled
alpha
login
or
join now
aleeve.dev
/
ott
2
fork
atom
Scalable and distributed custom feed generator, ott - on that topic
2
fork
atom
overview
issues
pulls
pipelines
Perhaps fix error with forced doubling slashes
aleeve.dev
4 months ago
d463fe14
988956a7
+7
-2
3 changed files
expand all
collapse all
unified
split
crates
Cargo.lock
ott-xrpc
Cargo.toml
src
main.rs
+1
crates/Cargo.lock
···
3432
"serde",
3433
"serde_json",
3434
"tokio",
0
3435
"tracing",
3436
"tracing-subscriber",
3437
"url",
···
3432
"serde",
3433
"serde_json",
3434
"tokio",
3435
+
"tower-http",
3436
"tracing",
3437
"tracing-subscriber",
3438
"url",
+1
crates/ott-xrpc/Cargo.toml
···
24
serde = { version = "1.0.228", features = ["derive"] }
25
serde_json = "1.0.145"
26
tokio = { version = "1.47.1", features = ["full"] }
0
27
tracing = "0.1.41"
28
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
29
url = "2.5.7"
···
24
serde = { version = "1.0.228", features = ["derive"] }
25
serde_json = "1.0.145"
26
tokio = { version = "1.47.1", features = ["full"] }
27
+
tower-http = { version = "0.6.6", features = ["normalize-path"] }
28
tracing = "0.1.41"
29
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
30
url = "2.5.7"
+5
-2
crates/ott-xrpc/src/main.rs
···
21
use tracing::info;
22
use tracing_subscriber::EnvFilter;
23
0
0
24
async fn handle_wellknown_atproto_did() -> Json<serde_json::Value> {
25
Json::from(Value::from("did:web:ott.aleeve.dev"))
26
}
···
68
69
let service = Service {
70
id: "#bsky_fg".into(),
71
-
service_endpoint: Some("https://ott.aleeve.dev/".into()),
72
r#type: "BskyFeedGenerator".into(),
73
extra_data: BTreeMap::default(),
74
};
···
92
.route(
93
"/.well-known/atproto-did",
94
get(handle_wellknown_atproto_did),
95
-
);
0
96
97
let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await.unwrap();
98
info!("Starting service");
···
21
use tracing::info;
22
use tracing_subscriber::EnvFilter;
23
24
+
use tower_http::normalize_path::NormalizePathLayer;
25
+
26
async fn handle_wellknown_atproto_did() -> Json<serde_json::Value> {
27
Json::from(Value::from("did:web:ott.aleeve.dev"))
28
}
···
70
71
let service = Service {
72
id: "#bsky_fg".into(),
73
+
service_endpoint: Some("https://ott.aleeve.dev".into()),
74
r#type: "BskyFeedGenerator".into(),
75
extra_data: BTreeMap::default(),
76
};
···
94
.route(
95
"/.well-known/atproto-did",
96
get(handle_wellknown_atproto_did),
97
+
)
98
+
.layer(NormalizePathLayer::trim_trailing_slash());
99
100
let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await.unwrap();
101
info!("Starting service");