Fix Hex encoding of assets file digests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-12-04 19:21:18 +01:00
parent 054fc0c4cc
commit b72fa90b67
3 changed files with 3 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ pub async fn assets_route(req: HttpRequest, path: web::Path<String>) -> HttpResp
None => HttpResponse::NotFound().body("404 Not found"),
Some(file) => {
let res = mime_guess::from_path(path).first_or_octet_stream();
let digest = format!("{:x?}", sha256(file.contents()));
let digest = hex::encode(sha256(file.contents()));
// Check if the browser already knows the file by date
if let Some(c) = req.headers().get(header::IF_MODIFIED_SINCE) {