add comment

This commit is contained in:
Felix Ableitner 2023-10-24 10:36:54 +02:00
parent fc66badd85
commit 540560b555

View file

@ -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 // TODO: Check that url corresponds to a federated image so that this can't be abused as a proxy
// for arbitrary purposes. // for arbitrary purposes.
let url = decode(&params.url)?.into_owned(); let url = decode(&params.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?; let image_response = context.client().get(url).send().await?;
Ok(HttpResponse::Ok().streaming(image_response.bytes_stream())) Ok(HttpResponse::Ok().streaming(image_response.bytes_stream()))