Fix layer application
This commit is contained in:
parent
16be83a0de
commit
2717e4a5fd
|
@ -38,6 +38,7 @@ async fn main() {
|
||||||
|
|
||||||
fn app() -> Router {
|
fn app() -> Router {
|
||||||
Router::new()
|
Router::new()
|
||||||
|
.route("/:command", get(command))
|
||||||
.layer(
|
.layer(
|
||||||
// Throttle incoming traffic
|
// Throttle incoming traffic
|
||||||
ServiceBuilder::new()
|
ServiceBuilder::new()
|
||||||
|
@ -55,7 +56,6 @@ fn app() -> Router {
|
||||||
.allow_origin("*".parse::<HeaderValue>().unwrap())
|
.allow_origin("*".parse::<HeaderValue>().unwrap())
|
||||||
.allow_methods([Method::GET]),
|
.allow_methods([Method::GET]),
|
||||||
)
|
)
|
||||||
.route("/:command", get(command))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Reference in New Issue