Skip to content

Commit

Permalink
server: pages: Provide html with charset as utf-8
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
patrickelectric committed Apr 22, 2021
1 parent 119c495 commit b645ca3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ pub fn root(req: HttpRequest) -> HttpResponse {
"" => load_file("index.html"),
file => load_file(file),
};
HttpResponse::Ok().content_type("text/html").body(path)
HttpResponse::Ok()
.content_type("text/html; charset=utf-8")
.body(path)
}

#[derive(Deserialize)]
Expand Down

0 comments on commit b645ca3

Please sign in to comment.