right, its a me! the teeny tiny waist sized space birb that is here to tell you that I added the ratelimiter!
It works just as i’ve explained in the last entry, it uses the IP of the user to limit the amount of requests via a ticket bucket. THe bucket is stored in memory, as again said before, so if the instance is restarted, goodbye ratelimits. EAch request eats 1 ticket AND the bucket tickets and refill rate can be set via the… middleware. who would have known wow. It always adds the typical “x-ratelimit-limit” bleh bleh bleh with all the info you can like that is useless BUT hey, its there for you.
I like making my own stuffies because its cool. THe root has a limit of 500 requests, refilling after 1 second. While the auth routes have a limit of 10 (sudo) and 20 (auth flows) requests, refilling after 1 minute. The other routes are just uhh protected under the umbrella of the root ratelimiter lol, no need for having to add a ratelimiter to every single route (god).
that’s it. there’s no more devlog. Now what i gotta start doing is the frontend. I will cry a bit because I am VERY very VEEERY rustified in the typescript department like I never touch it but meh I MUST do a frontend or else this is incomplete… and i will do be crying if i send it off in a incomplete state. THE frontend will be in svelte kit, because its cool and ive already used it in the last iteration and it left me with a good taste in my forked tongue (hahaha, i am space birb) AND thanks that Ive been using from the start utoipa to add an openapi schema, I can use it easily to make requests from the frontend! and i didnt need to suffer adding them after everything was done just like in the past iteration!
here’s your useless screenshot showing teh ratelimiter working and the headers and stuffies… god i am a mediocre at best writting long hecking devlogs for nothing:
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.