This commit is contained in:
Simon
2025-09-13 06:03:00 +00:00
parent c17590ccb3
commit a096ec66f2
3 changed files with 2 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ async fn main() -> std::io::Result<()> {
// Enable request logging // Enable request logging
unsafe { unsafe {
std::env::set_var("RUST_LOG", "info"); std::env::set_var("RUST_LOG", "warn");
} }
env_logger::init(); // You need this to actually see logs env_logger::init(); // You need this to actually see logs

View File

@@ -25,10 +25,6 @@ impl Proxy for AnyProxy {
url: String, url: String,
requester: web::types::State<Requester>, requester: web::types::State<Requester>,
) -> String { ) -> String {
println!(
"/proxy/video_url: url={:?}, provider={:?}",
url, self
);
match self { match self {
AnyProxy::Sxyprn(p) => { AnyProxy::Sxyprn(p) => {
p.get_video_url( p.get_video_url(

View File

@@ -28,7 +28,7 @@ async fn sxyprn(req: HttpRequest,
url if url != "" => url, url if url != "" => url,
_ => "Error".to_string(), _ => "Error".to_string(),
}; };
Ok(web::HttpResponse::MovedPermanently() Ok(web::HttpResponse::Found()
.header("Location", format!("https:{}", video_url)) .header("Location", format!("https:{}", video_url))
.finish()) .finish())
} }