Skip to content

Commit 1d7344f

Browse files
committed
Forward attestation to client via header
1 parent 0ba1421 commit 1d7344f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,14 @@ async fn handle_subgraph_query_inner(
539539
domain: domain.to_string(),
540540
subgraph: query.subgraph.as_ref().unwrap().deployment.ipfs_hash(),
541541
});
542+
let attestation = response
543+
.attestation
544+
.as_ref()
545+
.and_then(|attestation| serde_json::to_string(attestation).ok())
546+
.unwrap_or_default();
542547
Ok(HttpResponseBuilder::new(StatusCode::OK)
543548
.insert_header(header::ContentType::json())
549+
.insert_header(("Graph-Attestation", attestation))
544550
.body(&response.payload))
545551
}
546552

0 commit comments

Comments
 (0)