diff options
Diffstat (limited to 'src/api/middlewares')
-rw-r--r-- | src/api/middlewares/Authentication.ts | 6 | ||||
-rw-r--r-- | src/api/middlewares/BodyParser.ts | 4 | ||||
-rw-r--r-- | src/api/middlewares/CORS.ts | 4 | ||||
-rw-r--r-- | src/api/middlewares/ErrorHandler.ts | 6 | ||||
-rw-r--r-- | src/api/middlewares/RateLimit.ts | 10 | ||||
-rw-r--r-- | src/api/middlewares/Translation.ts | 4 | ||||
-rw-r--r-- | src/api/middlewares/index.ts | 4 |
7 files changed, 19 insertions, 19 deletions
diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index 771f0de8..09644eee 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { checkToken, Config, Rights } from "@fosscord/util"; +import { checkToken, Config, Rights } from "@spacebar/util"; import * as Sentry from "@sentry/node"; import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; diff --git a/src/api/middlewares/BodyParser.ts b/src/api/middlewares/BodyParser.ts index 646f33b1..ac8e0432 100644 --- a/src/api/middlewares/BodyParser.ts +++ b/src/api/middlewares/BodyParser.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published diff --git a/src/api/middlewares/CORS.ts b/src/api/middlewares/CORS.ts index e89fb909..3e7452fc 100644 --- a/src/api/middlewares/CORS.ts +++ b/src/api/middlewares/CORS.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published diff --git a/src/api/middlewares/ErrorHandler.ts b/src/api/middlewares/ErrorHandler.ts index a0664ccd..b8a73298 100644 --- a/src/api/middlewares/ErrorHandler.ts +++ b/src/api/middlewares/ErrorHandler.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -18,7 +18,7 @@ import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; -import { ApiError, FieldError } from "@fosscord/util"; +import { ApiError, FieldError } from "@spacebar/util"; const EntityNotFoundErrorRegex = /"(\w+)"/; export function ErrorHandler( diff --git a/src/api/middlewares/RateLimit.ts b/src/api/middlewares/RateLimit.ts index 1a28f356..0da292e9 100644 --- a/src/api/middlewares/RateLimit.ts +++ b/src/api/middlewares/RateLimit.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { getIpAdress } from "@fosscord/api"; -import { Config, getRights, listenEvent } from "@fosscord/util"; +import { getIpAdress } from "@spacebar/api"; +import { Config, getRights, listenEvent } from "@spacebar/util"; import { NextFunction, Request, Response, Router } from "express"; import { API_PREFIX_TRAILING_SLASH } from "./Authentication"; @@ -27,7 +27,7 @@ import { API_PREFIX_TRAILING_SLASH } from "./Authentication"; /* ? bucket limit? Max actions/sec per bucket? -(ANSWER: a small fosscord instance might not need a complex rate limiting system) +(ANSWER: a small spacebar instance might not need a complex rate limiting system) TODO: delay database requests to include multiple queries TODO: different for methods (GET/POST) > IP addresses that make too many invalid HTTP requests are automatically and temporarily restricted from accessing the Discord API. Currently, this limit is 10,000 per 10 minutes. An invalid request is one that results in 401, 403, or 429 statuses. diff --git a/src/api/middlewares/Translation.ts b/src/api/middlewares/Translation.ts index 928d29ff..60ff4ad7 100644 --- a/src/api/middlewares/Translation.ts +++ b/src/api/middlewares/Translation.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published diff --git a/src/api/middlewares/index.ts b/src/api/middlewares/index.ts index 096a7793..6384e1aa 100644 --- a/src/api/middlewares/index.ts +++ b/src/api/middlewares/index.ts @@ -1,6 +1,6 @@ /* - Fosscord: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Fosscord and Fosscord Contributors + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published |