wip: Custom mirroring tangled knot written in Rust
rust tangled mirror knot
1

Configure Feed

Select the types of activity you want to include in your feed.

oauth: fix some stuff

Clément (Jun 16, 2026, 7:35 PM +0200) 83f6a511 c441393a

+8 -4
+1 -1
Cargo.toml
··· 28 28 sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite", "migrate"] } 29 29 thiserror = "2.0" 30 30 tokio = { version = "1.52", features = ["rt", "macros", "rt-multi-thread"] } 31 - tower-http = { version = "0.6", features = ["trace"] } 31 + tower-http = { version = "0.6", features = ["trace", "cors"] } 32 32 tracing = "0.1" 33 33 tracing-subscriber = "0.3" 34 34 uuid = { version = "1.23", features = ["v7"] }
+3 -1
app/src/lib/atproto.ts
··· 30 30 31 31 export const newXrpcKnottyClient = () => 32 32 new Client({ 33 - handler: simpleFetchHandler({ service: "https://knotty-test.drawbu.dev" }), 33 + handler: simpleFetchHandler({ 34 + service: `https://${import.meta.env.KNOT_HOSTNAME}`, 35 + }), 34 36 }); 35 37 36 38 export const newXrpcBlueskyClient = () =>
+2 -2
app/src/lib/oauth_metadata.ts
··· 3 3 export function buildOAuthClientMetadata(hostname: string, isDev: boolean) { 4 4 const scope = `atproto repo:sh.tangled.repo rpc:dev.drawbu.knotty.create?aud=*`; 5 5 6 + const client_uri = isDev ? "http://127.0.0.1:5173" : `https://${hostname}`; 6 7 const client_id = isDev 7 - ? `http://localhost?redirect_uri=${encodeURIComponent(hostname)}&scope=${encodeURIComponent(scope)}` 8 + ? `http://localhost?redirect_uri=${encodeURIComponent(client_uri)}&scope=${encodeURIComponent(scope)}` 8 9 : `https://${hostname}/oauth-client-metadata.json`; 9 - const client_uri = isDev ? "http://localhost:5137" : `https://${hostname}`; 10 10 return { 11 11 client_id, 12 12 client_uri: client_uri,
+2
crates/knotty-knot/src/router.rs
··· 1 1 use axum::Router; 2 2 use jacquard_axum::did_web; 3 + use tower_http::cors::CorsLayer; 3 4 use tower_http::trace::TraceLayer; 4 5 5 6 use crate::state::KnotState; ··· 11 12 .merge(knotty_web::router()) 12 13 .merge(did_web::did_web_router(did_doc)) 13 14 .layer(TraceLayer::new_for_http()) 15 + .layer(CorsLayer::permissive()) 14 16 }