testing
This commit is contained in:
@@ -33,7 +33,7 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
// Enable request logging
|
||||
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
|
||||
|
||||
|
||||
@@ -25,10 +25,6 @@ impl Proxy for AnyProxy {
|
||||
url: String,
|
||||
requester: web::types::State<Requester>,
|
||||
) -> String {
|
||||
println!(
|
||||
"/proxy/video_url: url={:?}, provider={:?}",
|
||||
url, self
|
||||
);
|
||||
match self {
|
||||
AnyProxy::Sxyprn(p) => {
|
||||
p.get_video_url(
|
||||
|
||||
@@ -28,7 +28,7 @@ async fn sxyprn(req: HttpRequest,
|
||||
url if url != "" => url,
|
||||
_ => "Error".to_string(),
|
||||
};
|
||||
Ok(web::HttpResponse::MovedPermanently()
|
||||
Ok(web::HttpResponse::Found()
|
||||
.header("Location", format!("https:{}", video_url))
|
||||
.finish())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user