Fix Hex encoding of assets file digests
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user