From 118b61f614acf915796ad3aa53198198f23eb74c Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 20 Nov 2025 15:51:42 -0800 Subject: [PATCH] add public mode --- hyperdrive/Cargo.toml | 1 + hyperdrive/src/http/server.rs | 2 ++ 2 files changed, 3 insertions(+) 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("");