mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
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({
|
||||
methods: ['GET', 'POST'],
|
||||
...corsConfig
|
||||
exposedHeaders: [
|
||||
'Ratelimit-Limit',
|
||||
'Ratelimit-Policy',
|
||||
'Ratelimit-Remaining',
|
||||
'Ratelimit-Reset'
|
||||
],
|
||||
...corsConfig,
|
||||
}))
|
||||
|
||||
app.use('/api/json', apiLimiter);
|
||||
|
|
Loading…
Reference in a new issue