Skip to content

Commit

Permalink
Merge pull request #36 from Haste171/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
long2ice authored Jan 5, 2024
2 parents f6c214a + 394ae2e commit c85c9e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ app = FastAPI()

@app.on_event("startup")
async def startup():
redis = redis.from_url("redis://localhost", encoding="utf-8", decode_responses=True)
await FastAPILimiter.init(redis)
redis_connection = redis.from_url("redis://localhost", encoding="utf-8", decode_responses=True)
await FastAPILimiter.init(redis_connection)


@app.get("/", dependencies=[Depends(RateLimiter(times=2, seconds=5))])
Expand Down

0 comments on commit c85c9e8

Please sign in to comment.