api: expose rate limit headers
This commit is contained in:
parent
fb81c57324
commit
adf9267905
1 changed files with 7 additions and 1 deletions
|
@ -53,7 +53,13 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
|
||||||
|
|
||||||
app.use('/api', cors({
|
app.use('/api', cors({
|
||||||
methods: ['GET', 'POST'],
|
methods: ['GET', 'POST'],
|
||||||
...corsConfig
|
exposedHeaders: [
|
||||||
|
'Ratelimit-Limit',
|
||||||
|
'Ratelimit-Policy',
|
||||||
|
'Ratelimit-Remaining',
|
||||||
|
'Ratelimit-Reset'
|
||||||
|
],
|
||||||
|
...corsConfig,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
app.use('/api/json', apiLimiter);
|
app.use('/api/json', apiLimiter);
|
||||||
|
|
Loading…
Reference in a new issue