File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
rust/stackable-cockpitd/src/handlers Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
use axum:: {
2
2
extract:: Path ,
3
3
http:: { header:: CONTENT_TYPE , HeaderValue } ,
4
- response:: { AppendHeaders , Html , IntoResponse } ,
4
+ response:: { Html , IntoResponse } ,
5
5
routing:: get,
6
6
Router ,
7
7
} ;
@@ -18,14 +18,14 @@ async fn ui() -> Html<&'static str> {
18
18
}
19
19
async fn asset ( Path ( name) : Path < String > ) -> impl IntoResponse {
20
20
(
21
- AppendHeaders ( [ (
21
+ [ (
22
22
CONTENT_TYPE ,
23
- match name. split_once ( '.' ) {
23
+ match name. rsplit_once ( '.' ) {
24
24
Some ( ( _, "js" ) ) => HeaderValue :: from_static ( "text/javascript" ) ,
25
25
Some ( ( _, "css" ) ) => HeaderValue :: from_static ( "text/css" ) ,
26
26
_ => HeaderValue :: from_static ( "application/octet-stream" ) ,
27
27
} ,
28
- ) ] ) ,
28
+ ) ] ,
29
29
stackable_cockpit_web:: ASSETS [ & name] ,
30
30
)
31
31
}
You can’t perform that action at this time.
0 commit comments