Skip to content

Commit f1f63c3

Browse files
committed
fix: fix for served paths in new aw-webui build config (no more /static/)
1 parent 75ca368 commit f1f63c3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

aw-server/src/endpoints/mod.rs

+19
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@ fn root_favicon(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
8686
get_file("favicon.ico".into(), state)
8787
}
8888

89+
#[get("/dark.css")]
90+
fn root_dark(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
91+
get_file("dark.css".into(), state)
92+
}
93+
94+
#[get("/logo.png")]
95+
fn root_logo(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
96+
get_file("logo.png".into(), state)
97+
}
98+
99+
#[get("/manifest.json")]
100+
fn root_manifest(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
101+
get_file("manifest.json".into(), state)
102+
}
103+
89104
#[get("/")]
90105
fn server_info(config: &State<AWConfig>, state: &State<ServerState>) -> Json<Info> {
91106
#[allow(clippy::or_fun_call)]
@@ -136,6 +151,10 @@ pub fn build_rocket(server_state: ServerState, config: AWConfig) -> rocket::Rock
136151
root_css,
137152
root_js,
138153
root_static,
154+
// custom static files
155+
root_dark,
156+
root_logo,
157+
root_manifest
139158
],
140159
)
141160
.mount("/api/0/info", routes![server_info])

0 commit comments

Comments
 (0)