Retire Convex paths and standardize local-first Pi runtime

This commit is contained in:
Agent Board
2026-07-29 01:49:53 +08:00
parent 26ff1a9c9a
commit a40fa25ae6
85 changed files with 1653 additions and 3971 deletions
+4 -4
View File
@@ -50,7 +50,7 @@ pub struct OnlyOfficeProxyPreparationInput {
pub supabase_url: Option<String>,
pub supabase_internal_url: Option<String>,
pub onlyoffice_storage_host_override: Option<String>,
pub convex_origin: Option<String>,
pub extra_origin: Option<String>,
pub supabase_anon_key: Option<String>,
}
@@ -239,7 +239,7 @@ pub fn prepare_proxy_request(
let supa = try_parse_origin_host(input.supabase_url.as_deref());
let supa_internal_origin = try_parse_origin_url(input.supabase_internal_url.as_deref());
let storage_override = try_parse_origin_host(input.onlyoffice_storage_host_override.as_deref());
let convex_origin = try_parse_origin_url(input.convex_origin.as_deref());
let extra_origin = try_parse_origin_url(input.extra_origin.as_deref());
let is_supabase_path = target.path().starts_with("/storage/v1/")
|| target.path().starts_with("/auth/v1/")
@@ -302,7 +302,7 @@ pub fn prepare_proxy_request(
add_allowed(hostname, port);
}
if let Some(origin) = convex_origin.as_ref() {
if let Some(origin) = extra_origin.as_ref() {
let port = origin
.port()
.map(|value| value.to_string())
@@ -792,7 +792,7 @@ mod tests {
supabase_url: Some("https://public.example.com".into()),
supabase_internal_url: Some("http://127.0.0.1:18000".into()),
onlyoffice_storage_host_override: None,
convex_origin: Some("http://127.0.0.1:3210".into()),
extra_origin: Some("http://127.0.0.1:3210".into()),
supabase_anon_key: Some("anon".into()),
})
.expect("proxy should prepare");