Add content-type header
This commit is contained in:
parent
c6e6a9b5fe
commit
c91c6b9793
@ -145,7 +145,9 @@ fn calculate_hoc(
|
|||||||
let (tx, rx_body) = mpsc::unbounded();
|
let (tx, rx_body) = mpsc::unbounded();
|
||||||
let _ = tx.unbounded_send(Bytes::from(badge.to_svg().as_bytes()));
|
let _ = tx.unbounded_send(Bytes::from(badge.to_svg().as_bytes()));
|
||||||
|
|
||||||
Ok(HttpResponse::Ok().streaming(rx_body.map_err(|_| error::ErrorBadRequest("bad request"))))
|
Ok(HttpResponse::Ok()
|
||||||
|
.content_type("image/svg+xml")
|
||||||
|
.streaming(rx_body.map_err(|_| error::ErrorBadRequest("bad request"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn github(
|
fn github(
|
||||||
|
Loading…
Reference in New Issue
Block a user