Skip to content

Commit

Permalink
fix: avoid absolute path for URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Nov 20, 2024
1 parent d005475 commit c2730d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/torii/graphql/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn graphql_filter(

let subscription_endpoint = if let Some(external_url) = external_url {
let mut websocket_url = external_url.clone();
websocket_url.set_path("/graphql/ws");
websocket_url.set_path("graphql/ws");

let websocket_scheme = match websocket_url.scheme() {
"http" => "ws",
Expand All @@ -61,13 +61,13 @@ fn graphql_filter(
let _ = websocket_url.set_scheme(websocket_scheme);
websocket_url.to_string()
} else {
"/graphql/ws".to_string()
"graphql/ws".to_string()
};

let playground_filter = warp::path("graphql").map(move || {
warp::reply::html(
GraphiQLSource::build()
.endpoint("/graphql")
.endpoint("graphql")
.subscription_endpoint(subscription_endpoint.as_str())
.finish(),
)
Expand Down

0 comments on commit c2730d9

Please sign in to comment.