mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-08 01:34:26 +02:00
api: expose rate limit headers
This commit is contained in:
parent
fb81c57324
commit
adf9267905
@ -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…
x
Reference in New Issue
Block a user