0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-21 21:48:21 -05:00

🐛 fix: explicit content-type header for the search page response (#458)

This commit is contained in:
maokwen 2023-12-28 12:05:21 +08:00 committed by GitHub
parent 43357493d5
commit 9f5213cf42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,16 +68,18 @@ pub async fn search(
get_results(page + 1) get_results(page + 1)
); );
Ok(HttpResponse::Ok().body( Ok(HttpResponse::Ok()
crate::templates::views::search::search( .content_type("text/html; charset=utf-8")
&config.style.colorscheme, .body(
&config.style.theme, crate::templates::views::search::search(
&config.style.animation, &config.style.colorscheme,
query, &config.style.theme,
&results?, &config.style.animation,
) query,
.0, &results?,
)) )
.0,
))
} }
None => Ok(HttpResponse::TemporaryRedirect() None => Ok(HttpResponse::TemporaryRedirect()
.insert_header(("location", "/")) .insert_header(("location", "/"))