Skip to content

Commit

Permalink
fix: update backend name formatting in Fastly Forward Request example
Browse files Browse the repository at this point in the history
  • Loading branch information
katopz committed Feb 26, 2025
1 parent 8d98512 commit d856b71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/wasm/fastly-forward-request/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ fn main(req: Request) -> Result<Response, Error> {

// Get the host and set up a backend with timeouts and SSL.
let host = parsed_url.host().expect("Expected host").to_string();
let backend = Backend::builder("catbot_fw_backend", host.as_str())
let backend_name = host.replace('.', "_");
let backend = Backend::builder(backend_name.as_str(), host.as_str())
.override_host(host.as_str())
.connect_timeout(Duration::from_secs(1))
.first_byte_timeout(Duration::from_secs(15))
Expand Down

0 comments on commit d856b71

Please sign in to comment.