Skip to content

Commit a3fd5c8

Browse files
feat(iroh-relay)!: remove support for legacy headers (#3539)
## Description Closes #3507 ## Breaking Changes - `iroh-relay` servers can no longer issue captive portal challenges to pre `0.93` iroh nodes
1 parent 7ba10a6 commit a3fd5c8

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

iroh-relay/src/server.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ pub use self::{
5656
resolver::{DEFAULT_CERT_RELOAD_INTERVAL, ReloadingResolver},
5757
};
5858

59-
// TODO: remove before 1.0
60-
const NO_CONTENT_CHALLENGE_HEADER_LEGACY: &str = "X-Tailscale-Challenge";
6159
const NO_CONTENT_CHALLENGE_HEADER: &str = "X-Iroh-Challenge";
62-
const NO_CONTENT_RESPONSE_HEADER_LEGACY: &str = "X-Tailscale-Response";
6360
const NO_CONTENT_RESPONSE_HEADER: &str = "X-Iroh-Response";
6461
const NOTFOUND: &[u8] = b"Not Found";
6562
const ROBOTS_TXT: &[u8] = b"User-agent: *\nDisallow: /\n";
@@ -656,15 +653,6 @@ fn serve_no_content_handler<B: hyper::body::Body>(
656653
}
657654
}
658655

659-
if let Some(challenge) = r.headers().get(NO_CONTENT_CHALLENGE_HEADER_LEGACY) {
660-
if check(challenge) {
661-
response = response.header(
662-
NO_CONTENT_RESPONSE_HEADER_LEGACY,
663-
format!("response {}", challenge.to_str()?),
664-
);
665-
}
666-
}
667-
668656
response
669657
.status(StatusCode::NO_CONTENT)
670658
.body(body_empty())

0 commit comments

Comments
 (0)