diff --git a/hyperdrive/Cargo.toml b/hyperdrive/Cargo.toml index 4f7ad7e66..19f298ffd 100644 --- a/hyperdrive/Cargo.toml +++ b/hyperdrive/Cargo.toml @@ -17,6 +17,7 @@ anyhow = "1.0.71" sha2 = "0.10.8" [features] +public-mode = [] simulation-mode = [] [dependencies] diff --git a/hyperdrive/src/http/server.rs b/hyperdrive/src/http/server.rs index 1714057e8..66ee430b0 100644 --- a/hyperdrive/src/http/server.rs +++ b/hyperdrive/src/http/server.rs @@ -511,6 +511,7 @@ async fn ws_handler( .host() .contains("localhost"); + #[cfg(not(feature = "public-mode"))] if bound_path.authenticated { let Some(auth_token) = serialized_headers.get("cookie") else { return Err(warp::reject::not_found()); @@ -644,6 +645,7 @@ async fn http_handler( let is_localhost = host.as_ref().contains("localhost"); + #[cfg(not(feature = "public-mode"))] if bound_path.authenticated { if let Some(ref subdomain) = bound_path.secure_subdomain { let request_subdomain = host.host().split('.').next().unwrap_or("");