From 5ce7bde05c58e6a3c8d532ba7d06f76ce5c26549 Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 6 Jun 2022 11:20:42 +0800 Subject: [PATCH] fix: send index page with content-type (#26) --- src/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 5faff80..cda0804 100644 --- a/src/server.rs +++ b/src/server.rs @@ -666,7 +666,8 @@ impl InnerService { ), ); *res.body_mut() = output.into(); - + res.headers_mut() + .typed_insert(ContentType::from(mime_guess::mime::TEXT_HTML_UTF_8)); Ok(()) }