aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/response.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/response.rs b/src/response.rs
index 75fdb3b..1a68b08 100644
--- a/src/response.rs
+++ b/src/response.rs
@@ -93,6 +93,16 @@ pub async fn default(
timer = Instant::now();
+ if response.meta().starts_with("image/") {
+ if let Some(content_bytes) = &response.content_bytes() {
+ return Ok(
+ HttpResponse::build(actix_web::http::StatusCode::OK)
+ .content_type(response.meta().as_ref())
+ .body(content_bytes.to_vec()),
+ );
+ }
+ }
+
let mut html_context = if configuration.is_raw() {
String::new()
} else {