Fix style.css Content-Type and add robots.txt

This commit is contained in:
spikecodes 2020-11-19 21:28:50 -08:00
parent 0a3f333a97
commit 2236567b58
2 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,7 @@ mod user;
#[get("/style.css")] #[get("/style.css")]
async fn style() -> HttpResponse { async fn style() -> HttpResponse {
let file = fs::read_to_string("static/style.css").expect("ERROR: Could not read style.css"); let file = fs::read_to_string("static/style.css").expect("ERROR: Could not read style.css");
HttpResponse::Ok().body(file) HttpResponse::Ok().content_type("text/css").body(file)
} }
#[get("/favicon.ico")] #[get("/favicon.ico")]

2
static/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-Agent: *
Disallow: /