Skip to content

Commit

Permalink
Replace 0.0.0.0 with localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Feb 21, 2024
1 parent 8549cb2 commit c0cd511
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ async fn main() -> anyhow::Result<()> {
.expect("Failed to start libp2p relay server");

let endpoint = format!("http://{}", args.addr);
let graphql = format!("{}/graphql", endpoint);
let encoded: String = form_urlencoded::byte_serialize(graphql.as_bytes()).collect();
let gql_endpoint = format!("{}/graphql", endpoint);
let encoded: String =
form_urlencoded::byte_serialize(gql_endpoint.replace("0.0.0.0", "localhost").as_bytes())
.collect();
info!(target: "torii::cli", "Starting torii endpoint: {}", endpoint);
info!(target: "torii::cli", "Serving Graphql playground: {}", graphql);
info!(target: "torii::cli", "Serving Graphql playground: {}", gql_endpoint);
info!(target: "torii::cli", "World explorer is available on: {}\n", format!("https://worlds.dev/torii?url={}", encoded));

Check warning on line 206 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L199-L206

Added lines #L199 - L206 were not covered by tests

if let Some(listen_addr) = args.metrics {
Expand Down

0 comments on commit c0cd511

Please sign in to comment.