diff --git a/crates/websocket/src/chat_server.rs b/crates/websocket/src/chat_server.rs index 01f441ca2..2b58b2c1e 100644 --- a/crates/websocket/src/chat_server.rs +++ b/crates/websocket/src/chat_server.rs @@ -492,7 +492,7 @@ impl ChatServer { let user_operation = UserOperation::from_str(op)?; let fut = (message_handler)(context, msg.id, user_operation.clone(), data); match user_operation { - UserOperation::GetCaptcha => rate_limiter.image().wrap(ip, fut).await, + UserOperation::GetCaptcha => rate_limiter.post().wrap(ip, fut).await, _ => rate_limiter.message().wrap(ip, fut).await, } } diff --git a/src/api_routes.rs b/src/api_routes.rs index 020483bcc..aaa6d3ab9 100644 --- a/src/api_routes.rs +++ b/src/api_routes.rs @@ -159,7 +159,7 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) { .service( // Handle captcha separately web::resource("/user/get_captcha") - .wrap(rate_limit.image()) + .wrap(rate_limit.post()) .route(web::get().to(route_get::)), ) // User actions