Skip to content

Commit

Permalink
Appview rate limits parse cidr block (#1932)
Browse files Browse the repository at this point in the history
appview rate limits parse cidr block
  • Loading branch information
dholms authored Dec 5, 2023
1 parent 90564ee commit 10f934b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/bsky/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ export class ServerConfig {
const rateLimitsEnabled = process.env.RATE_LIMITS_ENABLED === 'true'
const rateLimitBypassKey = process.env.RATE_LIMIT_BYPASS_KEY
const rateLimitBypassIps = process.env.RATE_LIMIT_BYPASS_IPS
? process.env.RATE_LIMIT_BYPASS_IPS.split(',')
? process.env.RATE_LIMIT_BYPASS_IPS.split(',').map((ipOrCidr) =>
ipOrCidr.split('/')[0]?.trim(),
)
: undefined

return new ServerConfig({
Expand Down

0 comments on commit 10f934b

Please sign in to comment.