Skip to content

Commit

Permalink
Allow spin.alt host for self-requests
Browse files Browse the repository at this point in the history
Signed-off-by: itowlson <[email protected]>
  • Loading branch information
itowlson committed Jan 31, 2025
1 parent 24b8f0a commit 4109301
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/factor-outbound-http/src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ async fn send_request_impl(
let host = request.uri().host().unwrap_or_default();
let tls_client_config = component_tls_configs.get_client_config(host).clone();

if request.uri().authority().is_some() {
let is_self_request = request
.uri()
.authority()
.is_some_and(|a| a.host() == "self.alt");

if request.uri().authority().is_some() && !is_self_request {
// Absolute URI
let is_allowed = outbound_allowed_hosts
.check_url(&request.uri().to_string(), "https")
Expand Down

0 comments on commit 4109301

Please sign in to comment.