mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-01-31 10:26:52 -06:00
fix: properly handle binary proxied responses, enforce bun usage, proper mobile-friendly frontend
This commit is contained in:
+2
-2
@@ -503,7 +503,7 @@ async fn isr_handler(State(state): State<Arc<AppState>>, req: Request) -> Respon
|
||||
async fn proxy_to_bun(
|
||||
url: &str,
|
||||
state: Arc<AppState>,
|
||||
) -> Result<(StatusCode, HeaderMap, String), ProxyError> {
|
||||
) -> Result<(StatusCode, HeaderMap, axum::body::Bytes), ProxyError> {
|
||||
let client = if state.unix_client.is_some() {
|
||||
state.unix_client.as_ref().unwrap()
|
||||
} else {
|
||||
@@ -532,7 +532,7 @@ async fn proxy_to_bun(
|
||||
}
|
||||
}
|
||||
|
||||
let body = response.text().await.map_err(ProxyError::Network)?;
|
||||
let body = response.bytes().await.map_err(ProxyError::Network)?;
|
||||
Ok((status, headers, body))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user