Skip to content

Commit

Permalink
Merge pull request #29 from kozakura913/main
Browse files Browse the repository at this point in the history
キャッシュ制御を修正
  • Loading branch information
kozakura913 authored Apr 12, 2024
2 parents fd7ebaa + 28f32b9 commit f5e2b37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ async fn get_file(
)->Result<(axum::http::StatusCode,axum::headers::HeaderMap,StreamBody<impl futures::Stream<Item = Result<axum::body::Bytes, reqwest::Error>>>),axum::response::Response>{
let mut headers=axum::headers::HeaderMap::new();
headers.append("X-Remote-Url",q.url.parse().unwrap());
headers.append("Vary","Accept,Range".parse().unwrap());
let req=client.get(&q.url);
let req=req.timeout(std::time::Duration::from_millis(config.timeout));
let req=req.header("UserAgent",config.user_agent.clone());
Expand Down

0 comments on commit f5e2b37

Please sign in to comment.