forked from mirrors/relay
Only protect inbox with digest&sig verification
This commit is contained in:
parent
9fdd3bec18
commit
954e8968db
1 changed files with 10 additions and 7 deletions
17
src/main.rs
17
src/main.rs
|
@ -89,17 +89,20 @@ async fn main() -> Result<(), anyhow::Error> {
|
|||
let client = Client::default();
|
||||
|
||||
App::new()
|
||||
.wrap(VerifyDigest::new(Sha256::new()))
|
||||
.wrap(VerifySignature::new(
|
||||
MyVerify(state.clone(), client.clone()),
|
||||
Default::default(),
|
||||
))
|
||||
.wrap(Logger::default())
|
||||
.data(actor)
|
||||
.data(state.clone())
|
||||
.data(client)
|
||||
.data(client.clone())
|
||||
.service(web::resource("/").route(web::get().to(index)))
|
||||
.service(web::resource("/inbox").route(web::post().to(inbox::inbox)))
|
||||
.service(
|
||||
web::resource("/inbox")
|
||||
.wrap(VerifyDigest::new(Sha256::new()))
|
||||
.wrap(VerifySignature::new(
|
||||
MyVerify(state.clone(), client),
|
||||
Default::default(),
|
||||
))
|
||||
.route(web::post().to(inbox::inbox)),
|
||||
)
|
||||
.service(web::resource("/actor").route(web::get().to(actor_route)))
|
||||
.service(actix_webfinger::resource::<_, RelayResolver>())
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue