Merge branch 'auto-update' into dev

This commit is contained in:
Owen
2026-05-28 13:59:34 -07:00
14 changed files with 622 additions and 52 deletions

View File

@@ -1231,6 +1231,22 @@ authRouter.post(
newt.getNewtToken
);
authRouter.post(
"/newt/version",
rateLimit({
windowMs: 15 * 60 * 1000,
max: 60,
keyGenerator: (req) =>
`newtVersion:${req.body.newtId || ipKeyGenerator(req.ip || "")}`,
handler: (req, res, next) => {
const message = `You can only check the Newt version ${60} times every ${15} minutes. Please try again later.`;
return next(createHttpError(HttpCode.TOO_MANY_REQUESTS, message));
},
store: createStore()
}),
newt.getNewtVersion
);
authRouter.post(
"/newt/register",
rateLimit({