Skip to content

Commit 3ddbd6a

Browse files
feat: allow accessing the instrumentation server on any URL
1 parent ea6896c commit 3ddbd6a

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

crates/devtools-core/src/server.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ impl Server {
5555
let cors = CorsLayer::new()
5656
// allow `GET` and `POST` when accessing the resource
5757
.allow_methods([Method::GET, Method::POST])
58-
.allow_headers(AllowHeaders::any());
59-
60-
let cors = if option_env!("__DEVTOOLS_LOCAL_DEVELOPMENT").is_some() {
61-
cors.allow_origin(tower_http::cors::Any)
62-
} else {
63-
cors.allow_origin(HeaderValue::from_str("https://devtools.crabnebula.dev").unwrap())
64-
};
58+
.allow_headers(AllowHeaders::any())
59+
.allow_origin(tower_http::cors::Any);
6560

6661
let router = tonic::transport::Server::builder()
6762
.accept_http1(true)

0 commit comments

Comments
 (0)