fix: expose ratelimit headers via cors (#496)

This commit is contained in:
Angelo Kontaxis
2026-01-25 19:43:06 +00:00
committed by GitHub
parent 0dc5442498
commit a1a21252d0
5 changed files with 34 additions and 1 deletions

View File

@@ -70,6 +70,15 @@ pub async fn web() -> Rocket<Build> {
.iter()
.map(|s| FromStr::from_str(s).unwrap())
.collect(),
expose_headers: [
"X-Ratelimit-Limit",
"X-Ratelimit-Bucket",
"X-Ratelimit-Remaining",
"X-Ratelimit-Reset-After",
]
.iter()
.map(|s| s.to_string())
.collect(),
..Default::default()
}
.to_cors()