Implement api rate limiting with jester

2022-09-03 Thread Cnerd
For anyone trying to implement rate limiting with jester, I just created a jester plugin library [clown_limiter](https://github.com/C-NERD/clown_limiter) which can be used to implement rate limiting. I have published the library to nimble just waiting for the pull request to be merged and the li

Implement api rate limiting with jester

2022-07-25 Thread dom96
Yeah, we need manual docs for this stuff.

Implement api rate limiting with jester

2022-07-25 Thread xflywind
Because "before" is not a proc or template or macro, it is a special name reserved for the untyped routes macros=>

Implement api rate limiting with jester

2022-07-25 Thread Cnerd
Also it'll be nice if we could get a full documentation of the jester routes macros without having to read the code

Implement api rate limiting with jester

2022-07-25 Thread Cnerd
Ok, thanks. For some reason Nim doc failed to generate proper docs on the routes macro in general it doesn't usually generate proper docs for macros so I couldn't find this in the jester docs.

Implement api rate limiting with jester

2022-07-25 Thread dom96
You don't need middleware for this. You can create a route that runs before all requests (or all requests under a specific sub-path), for example: . So the following should work for you: before re"/*?": if ra

Implement api rate limiting with jester

2022-07-23 Thread Cnerd
Thanks I think I will switch my project's server to prologue

Implement api rate limiting with jester

2022-07-23 Thread exelotl
iirc what you're after is what many web frameworks call "middleware", which is not something that Jester has. However, there's [a fork](https://github.com/JohnAD/jesterwithplugins) from a couple of years ago which adds it. It was [covered in NimConf 2020](https://www.youtube.com/watch?v=BYv1QfJ

Implement api rate limiting with jester

2022-07-23 Thread Cnerd
Hello i am attempting to implement rate limiting on my jester server application and to do that i created a variable of type `OrderedTable` which would keep track of the ip address of all computers requesting from the server and would stop serving to theses computers if they exceed a certain lim