mirror of
https://github.com/deps-rs/deps.rs.git
synced 2025-01-30 14:56:41 +00:00
fix: set status code to 404 for the not found page (#244)
This commit is contained in:
parent
ab2a38efb2
commit
7fe6aaf8c5
1 changed files with 5 additions and 2 deletions
|
@ -4,7 +4,7 @@ use actix_web::{
|
|||
get,
|
||||
http::{
|
||||
header::{ContentType, ETag, EntityTag},
|
||||
Uri,
|
||||
StatusCode, Uri,
|
||||
},
|
||||
web::{Html, Redirect, ServiceConfig, ThinData},
|
||||
Either, HttpResponse, Resource, Responder,
|
||||
|
@ -300,7 +300,10 @@ pub(crate) fn static_files(cfg: &mut ServiceConfig) {
|
|||
}
|
||||
|
||||
pub(crate) async fn not_found() -> impl Responder {
|
||||
Html::new(views::html::error::render_404().0)
|
||||
(
|
||||
Html::new(views::html::error::render_404().0),
|
||||
StatusCode::NOT_FOUND,
|
||||
)
|
||||
}
|
||||
|
||||
static SELF_BASE_URL: LazyLock<String> =
|
||||
|
|
Loading…
Reference in a new issue