chore: generate
This commit is contained in:
@@ -7,9 +7,7 @@ import { ZenData } from "@opencode-ai/console-core/model.js"
|
|||||||
export function createRateLimiter(limit: ZenData.RateLimit | undefined, rawIp: string, headers: Headers) {
|
export function createRateLimiter(limit: ZenData.RateLimit | undefined, rawIp: string, headers: Headers) {
|
||||||
if (!limit) return
|
if (!limit) return
|
||||||
|
|
||||||
const limitValue = (limit.checkHeader && !headers.get(limit.checkHeader))
|
const limitValue = limit.checkHeader && !headers.get(limit.checkHeader) ? limit.fallbackValue! : limit.value
|
||||||
? limit.fallbackValue!
|
|
||||||
: limit.value
|
|
||||||
|
|
||||||
const ip = !rawIp.length ? "unknown" : rawIp
|
const ip = !rawIp.length ? "unknown" : rawIp
|
||||||
const now = Date.now()
|
const now = Date.now()
|
||||||
|
|||||||
Reference in New Issue
Block a user