Skip to content

Commit 22dbb76

Browse files
committed
fix our proxy detection
Signed-off-by: Yujong Lee <yujonglee.dev@gmail.com>
1 parent 8cfbc86 commit 22dbb76

File tree

1 file changed

+6
-1
lines changed
  • crates/owhisper-client/src/adapter

1 file changed

+6
-1
lines changed

crates/owhisper-client/src/adapter/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ pub(crate) fn host_matches(base_url: &str, predicate: impl Fn(&str) -> bool) ->
230230
}
231231

232232
fn is_hyprnote_cloud(base_url: &str) -> bool {
233-
host_matches(base_url, |h| h.contains("hyprnote.com"))
233+
host_matches(base_url, |h| {
234+
h.contains("hyprnote.com") || h.contains("char.com")
235+
})
234236
}
235237

236238
fn is_hyprnote_local_proxy(base_url: &str) -> bool {
@@ -550,6 +552,8 @@ mod tests {
550552
fn test_is_hyprnote_proxy() {
551553
assert!(is_hyprnote_proxy("https://api.hyprnote.com/stt"));
552554
assert!(is_hyprnote_proxy("https://api.hyprnote.com"));
555+
assert!(is_hyprnote_proxy("https://api.char.com/stt"));
556+
assert!(is_hyprnote_proxy("https://api.char.com"));
553557
assert!(is_hyprnote_proxy("http://localhost:3001/stt"));
554558
assert!(is_hyprnote_proxy("http://127.0.0.1:3001/stt"));
555559

@@ -750,6 +754,7 @@ mod tests {
750754

751755
let proxy_urls = &[
752756
"https://api.hyprnote.com/stt",
757+
"https://api.char.com/stt",
753758
"http://localhost:3001/stt",
754759
"http://127.0.0.1:3001/stt",
755760
];

0 commit comments

Comments
 (0)