remove rate
Some checks are pending
Docker Build and Push / build (push) Waiting to run

This commit is contained in:
Tsuki 2025-08-17 22:34:15 +08:00
parent 22f57d1c7e
commit 2f55eec940

View File

@ -105,19 +105,19 @@ pub async fn create_router(
router_s router_s
.route("/graphql", get(not_found).post(graphql_handler)) .route("/graphql", get(not_found).post(graphql_handler))
.route_layer( // .route_layer(
RateLimitLayer::<RealIp>::builder() // RateLimitLayer::<RealIp>::builder()
.with_route( // .with_route(
(Method::GET, "/graphql"), // (Method::GET, "/graphql"),
Quota::new(Duration::from_millis(100), NonZero::new(10).unwrap()), // Quota::new(Duration::from_millis(100), NonZero::new(10).unwrap()),
) // )
.with_route( // .with_route(
(Method::POST, "/graphql"), // (Method::POST, "/graphql"),
Quota::new(Duration::from_millis(100), NonZero::new(10).unwrap()), // Quota::new(Duration::from_millis(100), NonZero::new(10).unwrap()),
) // )
.with_gc_interval(1000) // .with_gc_interval(1000)
.default_handle_error(), // .default_handle_error(),
) // )
.route_service("/ws", GraphQLSubscription::new(schema)) .route_service("/ws", GraphQLSubscription::new(schema))
.layer(CorsLayer::permissive()) .layer(CorsLayer::permissive())
.merge(router) .merge(router)