Api changes

This commit is contained in:
Owen Schwartz 2024-10-19 18:47:41 -04:00
parent 682210c46f
commit 38bcbfdb8f
20 changed files with 319 additions and 154 deletions

View file

@ -36,13 +36,15 @@ app.prepare().then(() => {
externalServer.use(cors());
externalServer.use(cookieParser());
externalServer.use(express.json());
externalServer.use(
rateLimitMiddleware({
windowMin: 1,
max: 100,
type: "IP_ONLY",
}),
);
if (!dev) {
externalServer.use(
rateLimitMiddleware({
windowMin: 1,
max: 100,
type: "IP_ONLY",
}),
);
}
const prefix = `/api/v1`;
externalServer.use(prefix, unauthenticated);