Set content-type for livereload script

Closes #667
This commit is contained in:
Vincent Prouillet 2019-04-18 19:11:04 +02:00
parent 603906de85
commit 2aa3ea758b
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ impl<S> Middleware<S> for NotFoundHandler {
} }
} }
fn livereload_handler(_: &HttpRequest) -> &'static str { fn livereload_handler(_: &HttpRequest) -> HttpResponse {
LIVE_RELOAD HttpResponse::Ok().content_type("text/javascript").body(LIVE_RELOAD)
} }
fn rebuild_done_handling(broadcaster: &Option<Sender>, res: Result<()>, reload_path: &str) { fn rebuild_done_handling(broadcaster: &Option<Sender>, res: Result<()>, reload_path: &str) {