Browse Source

Set content-type for livereload script

Closes #667
index-subcmd
Vincent Prouillet 5 years ago
parent
commit
2aa3ea758b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/cmd/serve.rs

+ 2
- 2
src/cmd/serve.rs View File

@@ -86,8 +86,8 @@ impl<S> Middleware<S> for NotFoundHandler {
}
}

fn livereload_handler(_: &HttpRequest) -> &'static str {
LIVE_RELOAD
fn livereload_handler(_: &HttpRequest) -> HttpResponse {
HttpResponse::Ok().content_type("text/javascript").body(LIVE_RELOAD)
}

fn rebuild_done_handling(broadcaster: &Option<Sender>, res: Result<()>, reload_path: &str) {


Loading…
Cancel
Save