testing
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -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())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user