HemmeligOrg / Hemmelig.app

Keep your sensitive information out of chat logs, emails, and more with encrypted secrets.
https://hemmelig.app
MIT License
684 stars 59 forks source link

[OTHER] Ratelimit exceeded + Route not found #218

Closed FuckingToasters closed 11 months ago

FuckingToasters commented 11 months ago

What would you like to share?

Lately i get this issue a lot. instead of the website, it shows following json object:

{
    "statusCode": 429,
    "error": "Too Many Requests",
    "message": "Rate limit exceeded, retry in 1 minute"
}

The logs show following:

2023/09/29 01:35PM 30 pid=19 hostname=hemmelig reqId=req-6v97 res={"statusCode":429} err={"type":"Error","message":"Rate limit exceeded, retry in 1 minute","stack":"Error: Rate limit exceeded, retry in 1 minute\n    at Object.defaultErrorResponse [as errorResponseBuilder] (/home/node/hemmelig/node_modules/@fastify/rate-limit/index.js:271:15)\n    at Object.onRequestRateLimiter (/home/node/hemmelig/node_modules/@fastify/rate-limit/index.js:266:18)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","statusCode":429} msg=Rate limit exceeded, retry in 1 minute
2023/09/29 01:35PM 30 pid=19 hostname=hemmelig reqId=req-6v97 res={"statusCode":429} responseTime=0.34871482849121094 msg=request completed
2023/09/29 01:35PM 30 pid=19 hostname=hemmelig reqId=req-6v98 res={"statusCode":429} err={"type":"Error","message":"Rate limit exceeded, retry in 1 minute","stack":"Error: Rate limit exceeded, retry in 1 minute\n    at Object.defaultErrorResponse [as errorResponseBuilder] (/home/node/hemmelig/node_modules/@fastify/rate-limit/index.js:271:15)\n    at Object.onRequestRateLimiter (/home/node/hemmelig/node_modules/@fastify/rate-limit/index.js:266:18)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","statusCode":429} msg=Rate limit exceeded, retry in 1 minute
2023/09/29 01:35PM 30 pid=19 hostname=hemmelig reqId=req-6v98 res={"statusCode":429} err={"type":"Error","message":"Rate limit exceeded, retry in 1 minute","stack":"Error: Rate limit exceeded, retry in 1 minute\n    at Object.defaultErrorResponse [as errorResponseBuilder] (/home/node/hemmelig/node_modules/@fastify/rate-limit/index.js:271:15)\n    at Object.onRequestRateLimiter (/home/node/hemmelig/node_modules/@fastify/rate-limit/index.js:266:18)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","statusCode":429} msg=Rate limit exceeded, retry in 1 minute
2023/09/29 01:35PM 30 pid=19 hostname=hemmelig reqId=req-6v98 res={"statusCode":429} responseTime=0.36701297760009766 msg=request completed

Tbh, i don't really do anything which could cause that issue, like i don't refresh the site every nanosecond.

How can i get rid of this? or at least increase the ratelimit threashold so you won't become ratelimited this quickly?

Additional information

When visiting the homepage:

{
    "message": "Route POST:/ not found",
    "error": "Not Found",
    "statusCode": 404
}
FuckingToasters commented 11 months ago

It not only happen to me, it also happen to users who visit the site for the first time....

bjarneo commented 11 months ago

Just remove it from the server.js file.