thats not a possible header anymore

This commit is contained in:
localhost 2025-11-16 10:45:50 +01:00
parent 8f67b0ca75
commit ddc1bf72d6
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ const limiter = new RedisRateLimiter({
})
app.get('/search', async ({ headers, query: { search }, set, redirect, error }) => {
const hash = Bun.hash(headers['x-userip'] || headers['cf-connecting-ip'] || '0.0.0.0')
const hash = Bun.hash(headers['cf-connecting-ip'] || '0.0.0.0')
const isLimited = await limiter.limit(hash.toString())
if (isLimited) return error(429, 'You have been ratelimited.')