diff --git a/crates/mako/src/dev.rs b/crates/mako/src/dev.rs index 4f59f2ac0..6d5346508 100644 --- a/crates/mako/src/dev.rs +++ b/crates/mako/src/dev.rs @@ -10,7 +10,7 @@ use anyhow::{self, Result}; use colored::Colorize; use futures::{SinkExt, StreamExt}; use get_if_addrs::get_if_addrs; -use hyper::header::CONTENT_TYPE; +use hyper::header::{ACCESS_CONTROL_ALLOW_ORIGIN, CACHE_CONTROL, CONTENT_TYPE}; use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Request, Server}; use notify_debouncer_full::new_debouncer; @@ -179,6 +179,8 @@ impl DevServer { return Ok(hyper::Response::builder() .status(hyper::StatusCode::OK) + .header(CACHE_CONTROL, "no-cache") + .header(ACCESS_CONTROL_ALLOW_ORIGIN, "*") .header(CONTENT_TYPE, content_type) .body(hyper::Body::from(res)) .unwrap());