File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ export function createRateLimiter(
1717 const dict = i18n ( localeFromRequest ( request ) )
1818
1919 const limits = Subscription . getFreeLimits ( )
20- const headerExists = request . headers . has ( limits . checkHeader )
21- const dailyLimit = ! headerExists ? limits . fallbackValue : ( rateLimit ?? limits . dailyRequests )
22- const isDefaultModel = headerExists && ! rateLimit
20+ const dailyLimit = rateLimit ?? limits . dailyRequests
21+ const isDefaultModel = ! rateLimit
2322
2423 const ip = ! rawIp . length ? "unknown" : rawIp
2524 const now = Date . now ( )
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ export namespace Subscription {
99 free : z . object ( {
1010 promoTokens : z . number ( ) . int ( ) ,
1111 dailyRequests : z . number ( ) . int ( ) ,
12- checkHeader : z . string ( ) ,
13- fallbackValue : z . number ( ) . int ( ) ,
1412 } ) ,
1513 lite : z . object ( {
1614 rollingLimit : z . number ( ) . int ( ) ,
You can’t perform that action at this time.
0 commit comments