Set content-type header for index page
This commit is contained in:
parent
c91c6b9793
commit
bbb006fcf0
@ -176,7 +176,9 @@ fn index() -> HttpResponse {
|
||||
let (tx, rx_body) = mpsc::unbounded();
|
||||
let _ = tx.unbounded_send(Bytes::from(INDEX.as_bytes()));
|
||||
|
||||
HttpResponse::Ok().streaming(rx_body.map_err(|_| error::ErrorBadRequest("bad request")))
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html")
|
||||
.streaming(rx_body.map_err(|_| error::ErrorBadRequest("bad request")))
|
||||
}
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user