Skip to content

Commit 0af372c

Browse files
committed
fix: use MEDIA_CLIENT for GitHub fetches
1 parent f46590d commit 0af372c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::sync::LazyLock;
99
use futures_lite::FutureExt;
1010
use hyper::{header::HeaderValue, Body, Request, Response};
1111
use log::{info, warn};
12-
use redlib::client::{canonical_path, proxy, rate_limit_check, CLIENT};
12+
use redlib::client::{canonical_path, proxy, rate_limit_check, MEDIA_CLIENT};
1313
use redlib::server::{self, RequestExt};
1414
use redlib::utils::{error, redirect, ThemeAssets};
1515
use redlib::{config, duplicates, headers, instance_info, post, search, settings, subreddit, user};
@@ -436,7 +436,7 @@ pub async fn proxy_commit_info() -> Result<Response<Body>, String> {
436436
#[cached(time = 600)]
437437
async fn fetch_commit_info() -> String {
438438
// wreq uses http v1.x: pass URL as &str and call .send().await, then .bytes().await
439-
let bytes = CLIENT
439+
let bytes = MEDIA_CLIENT
440440
.get("https://github.com/redlib-org/redlib/commits/main.atom")
441441
.send()
442442
.await
@@ -460,7 +460,7 @@ pub async fn proxy_instances() -> Result<Response<Body>, String> {
460460
#[cached(time = 600)]
461461
async fn fetch_instances() -> String {
462462
// wreq uses http v1.x: pass URL as &str and call .send().await, then .bytes().await
463-
let bytes = CLIENT
463+
let bytes = MEDIA_CLIENT
464464
.get("https://raw.githubusercontent.com/redlib-org/redlib-instances/refs/heads/main/instances.json")
465465
.send()
466466
.await

0 commit comments

Comments
 (0)