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