fix(labrinth): cors headers on ratelimited (#3189)
Kinda hotfix. Fixes #2591 Fixes #2529
This commit is contained in:
parent
9180f5c8d0
commit
a5427f7287
@ -1,5 +1,6 @@
|
||||
use actix_cors::Cors;
|
||||
|
||||
// Updating this? Remember to update the ratelimit CORS too!
|
||||
pub fn default_cors() -> Cors {
|
||||
Cors::default()
|
||||
.allow_any_origin()
|
||||
|
||||
@ -168,6 +168,15 @@ where
|
||||
wait_time.as_secs().into(),
|
||||
);
|
||||
|
||||
// TODO: Sentralize CORS in the CORS util.
|
||||
headers.insert(
|
||||
actix_web::http::header::HeaderName::from_str(
|
||||
"Access-Control-Allow-Origin",
|
||||
)
|
||||
.unwrap(),
|
||||
"*".parse().unwrap(),
|
||||
);
|
||||
|
||||
Box::pin(async {
|
||||
Ok(req.into_response(response.map_into_right_body()))
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user