api: expose rate limit headers

This commit is contained in:
wukko 2024-05-16 13:59:53 +06:00
parent fb81c57324
commit adf9267905
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -53,7 +53,13 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
app.use('/api', cors({
methods: ['GET', 'POST'],
...corsConfig
exposedHeaders: [
'Ratelimit-Limit',
'Ratelimit-Policy',
'Ratelimit-Remaining',
'Ratelimit-Reset'
],
...corsConfig,
}))
app.use('/api/json', apiLimiter);