Skip to content

Commit 4109301

Browse files
committed
Allow spin.alt host for self-requests
Signed-off-by: itowlson <[email protected]>
1 parent 24b8f0a commit 4109301

File tree

1 file changed

+6
-1
lines changed
  • crates/factor-outbound-http/src

1 file changed

+6
-1
lines changed

crates/factor-outbound-http/src/wasi.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ async fn send_request_impl(
152152
let host = request.uri().host().unwrap_or_default();
153153
let tls_client_config = component_tls_configs.get_client_config(host).clone();
154154

155-
if request.uri().authority().is_some() {
155+
let is_self_request = request
156+
.uri()
157+
.authority()
158+
.is_some_and(|a| a.host() == "self.alt");
159+
160+
if request.uri().authority().is_some() && !is_self_request {
156161
// Absolute URI
157162
let is_allowed = outbound_allowed_hosts
158163
.check_url(&request.uri().to_string(), "https")

0 commit comments

Comments
 (0)