From 540560b555749eaebcdca5dc9e778200e820b564 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 24 Oct 2023 10:36:54 +0200 Subject: [PATCH] add comment --- crates/routes/src/image_proxy.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/routes/src/image_proxy.rs b/crates/routes/src/image_proxy.rs index d0bb7b417..92fe70b51 100644 --- a/crates/routes/src/image_proxy.rs +++ b/crates/routes/src/image_proxy.rs @@ -28,6 +28,8 @@ async fn image_proxy( // TODO: Check that url corresponds to a federated image so that this can't be abused as a proxy // for arbitrary purposes. let url = decode(¶ms.url)?.into_owned(); + // TODO: Once pictrs 0.5 is out, use it for proxying like GET /image/original?proxy={url} + // https://git.asonix.dog/asonix/pict-rs/#api let image_response = context.client().get(url).send().await?; Ok(HttpResponse::Ok().streaming(image_response.bytes_stream()))