mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-04 20:30:37 +00:00
Fix Static File Bundling
This commit is contained in:
parent
3902a36ea3
commit
8f157c0b40
4 changed files with 16581 additions and 68 deletions
|
@ -12,14 +12,12 @@ mod utils;
|
|||
// Create Services
|
||||
#[get("/style.css")]
|
||||
async fn style() -> HttpResponse {
|
||||
let file = std::fs::read_to_string("static/style.css").expect("ERROR: Could not read style.css");
|
||||
HttpResponse::Ok().content_type("text/css").body(file)
|
||||
HttpResponse::Ok().content_type("text/css").body(include_str!("../static/style.css"))
|
||||
}
|
||||
|
||||
#[get("/robots.txt")]
|
||||
async fn robots() -> HttpResponse {
|
||||
let file = std::fs::read_to_string("static/robots.txt").expect("ERROR: Could not read robots.txt");
|
||||
HttpResponse::Ok().body(file)
|
||||
HttpResponse::Ok().body(include_str!("../static/robots.txt"))
|
||||
}
|
||||
|
||||
#[get("/favicon.ico")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue