Skip to content

Commit

Permalink
Tweak createSession rate limit key (#1614)
Browse files Browse the repository at this point in the history
tweak create session rl key
  • Loading branch information
dholms authored Sep 15, 2023
1 parent 1cec2dd commit 17ce804
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pds/src/api/com/atproto/server/createSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export default function (server: Server, ctx: AppContext) {
{
durationMs: DAY,
points: 300,
calcKey: ({ input }) => input.body.identifier,
calcKey: ({ input, req }) => `${input.body.identifier}-${req.ip}`,
},
{
durationMs: 5 * MINUTE,
points: 30,
calcKey: ({ input }) => input.body.identifier,
calcKey: ({ input, req }) => `${input.body.identifier}-${req.ip}`,
},
],
handler: async ({ input }) => {
Expand Down

0 comments on commit 17ce804

Please sign in to comment.