hplush / slowreader

Web app to combine feeds from social networks and RSS and to help read more meaningful and deep content
https://dev.slowreader.app
GNU Affero General Public License v3.0
153 stars 37 forks source link

Add request rate limit to proxy #227

Closed janefawkes closed 3 weeks ago

janefawkes commented 3 months ago

Fixes #168

I sort of tested this by running the proxy and spamming it with batches of requests (like this). It works on my machine™, but pnpm test doesn't quite agree with it.

Would love to hear any sort of feedback on this, because I'm not sure if I'm moving in the right direction or not.

Additional changes: proxy config and error handling have been divorced from the createProxyServer implementation.

ai commented 3 months ago

Now you need to fix tests (it is better to add some test for rate limit too) and we are ready to merge.

You can run tests by cd proxy and pnpm test.

You also need to fix ESLint warnings by calling eslint --fix .

janefawkes commented 3 months ago

ESLint warnings are fixed now.

Not sure what to do with tests, though. I am a bit stuck with them and I don't really know how to ensure proper coverage image

github-actions[bot] commented 3 months ago

Pull request auto-reviewer

[ ] If you added a new dependency, check our requirements.