From e294c00c0b2a9f1a3ebcedc7668d27ab5bae40b0 Mon Sep 17 00:00:00 2001 From: Milky0217 Date: Fri, 17 Oct 2025 16:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 716ef4b..d694843 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -use std::pin::Pin; - use actix_web::middleware::from_fn; use actix_web::{App, HttpResponse, HttpServer, Responder, delete, get, post, web}; use include_dir::{Dir, include_dir}; @@ -7,6 +5,7 @@ use log::{debug, error, info, warn}; use openssl::ssl::{SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod}; use reqwest::Client; use sqlx::postgres::PgPool; +use std::pin::Pin; mod auth; mod db; mod models; @@ -577,6 +576,7 @@ async fn serve_static_files(path: web::Path) -> impl Responder { Some(file) => { // 根据文件扩展名设置 Content-Type let content_type = match file_path.split('.').last() { + Some("ico") => "image/x-icon", Some("css") => "text/css", Some("js") => "application/javascript", Some("html") => "text/html",