Skip to content

Commit

Permalink
更新前端版本号并将前端资源缓存时间从1天调整为7天
Browse files Browse the repository at this point in the history
  • Loading branch information
heqingpan committed Aug 18, 2024
1 parent f92715c commit 7190d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mime_guess = { version = "2" }
rusqlite = { version = "0.25", features = ["bundled"] }
rsql_builder = "0.1.5"
inner-mem-cache = "0.1.7"
rnacos-web-dist-wrap = "=0.3.17"
rnacos-web-dist-wrap = "=0.3.18"
nacos_rust_client = "0.2"
zip = "0.6"
tempfile = "3"
Expand Down
2 changes: 1 addition & 1 deletion src/web_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn handle_embedded_file_with_cache(path: &str) -> HttpResponse {
match get_embedded_file(path) {
Some(content) => HttpResponse::Ok()
.content_type(from_path(path).first_or_octet_stream().as_ref())
.insert_header(("Cache-Control", "max-age=86400, public"))
.insert_header(("Cache-Control", "max-age=604800, public"))
.body(content.data.into_owned()),
None => HttpResponse::NotFound().body("404 Not Found"),
}
Expand Down

0 comments on commit 7190d8d

Please sign in to comment.