diff --git a/apps/labrinth/src/util/ratelimit.rs b/apps/labrinth/src/util/ratelimit.rs index aa3fd81ff4..abdf3132f4 100644 --- a/apps/labrinth/src/util/ratelimit.rs +++ b/apps/labrinth/src/util/ratelimit.rs @@ -177,6 +177,22 @@ where "*".parse().unwrap(), ); + headers.insert( + actix_web::http::header::HeaderName::from_str( + "Access-Control-Allow-Methods", + ) + .unwrap(), + "*".parse().unwrap(), + ); + + headers.insert( + actix_web::http::header::HeaderName::from_str( + "Access-Control-Expose-Headers", + ) + .unwrap(), + "X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset".parse().unwrap(), + ); + Box::pin(async { Ok(req.into_response(response.map_into_right_body())) })