Compare commits

..

2 commits

Author SHA1 Message Date
Rob Ede
dcd41ac5e3
refactor: migrate web server to Actix Web 2024-05-27 06:34:51 +01:00
Rob Ede
85a077e80d
refactor: migrate to tracing for logging 2024-05-26 23:22:19 +01:00

View file

@ -267,7 +267,7 @@ fn status_format_analysis(
} }
pub(crate) fn static_files(cfg: &mut ServiceConfig) { pub(crate) fn static_files(cfg: &mut ServiceConfig) {
cfg.service(Resource::new(STATIC_STYLE_CSS_PATH).get(|| async { cfg.service(Resource::new(STATIC_STYLE_CSS_PATH).to(|| async {
HttpResponse::Ok() HttpResponse::Ok()
.insert_header(ContentType(mime::TEXT_CSS_UTF_8)) .insert_header(ContentType(mime::TEXT_CSS_UTF_8))
.insert_header(ETag(EntityTag::new_strong( .insert_header(ETag(EntityTag::new_strong(
@ -280,7 +280,7 @@ pub(crate) fn static_files(cfg: &mut ServiceConfig) {
])) ]))
.body(assets::STATIC_STYLE_CSS) .body(assets::STATIC_STYLE_CSS)
})) }))
.service(Resource::new(STATIC_FAVICON_PATH).get(|| async { .service(Resource::new(STATIC_FAVICON_PATH).to(|| async {
HttpResponse::Ok() HttpResponse::Ok()
.insert_header(ContentType(mime::IMAGE_SVG)) .insert_header(ContentType(mime::IMAGE_SVG))
.body(assets::STATIC_FAVICON) .body(assets::STATIC_FAVICON)