Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions crates/edgezero-adapter-fastly/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,23 @@ fn ensure_backend(uri: &Uri) -> Result<Backend, EdgeError> {
None => host.to_string(),
};

let builder = Backend::builder(&name, &host_with_port).override_host(host);
let mut builder = Backend::builder(&name, &host_with_port).override_host(host);
if uri.scheme_str() == Some("https") {
builder = builder
.enable_ssl()
.sni_hostname(host)
.check_certificate(host);
Copy link
Contributor

@aram356 aram356 Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏕️ In development we need to allow to disable check certificates See #36

}

match builder.finish() {
Ok(backend) => Ok(backend),
Err(_) => {
let mut builder = Backend::builder(&name, &target);
if uri.scheme_str() == Some("https") {
builder = builder.enable_ssl();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason this tries again without port?

trusted server doesn't do this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is legacy and was not tested in production

builder = builder
.enable_ssl()
.sni_hostname(host)
.check_certificate(host);
}
builder.finish().map_err(EdgeError::internal)
}
Expand Down