Disabled this shitty rate limiter

This commit is contained in:
DrMint 2024-05-12 17:14:24 +02:00
parent 533e182d0d
commit c745e18b5d
3 changed files with 2 additions and 7 deletions

View File

@ -23,5 +23,3 @@ SFTP_DESTINATION_PATH_ROOT="/absolute/path/to/destination/root/folder"
SFTP_BASE_URL=https://base-url.com
PAYLOAD_PUBLIC_FRONTEND_BASE_URL=https://domain.com
RATING_LIMIT_SKIP_TOKEN=ratelimitskiptoken5e6ea45ef4e66eaa151612bdcb599df

View File

@ -88,9 +88,7 @@ export default buildConfig({
disable: true,
},
rateLimit: {
window: 900_000, // 15 minutes
max: 500,
skip: (request) => request.headers["x-rate-limit-skip"] === process.env.RATING_LIMIT_SKIP_TOKEN,
skip: () => true,
},
plugins: [
cloudStorage({

View File

@ -77,7 +77,6 @@ const injectAuth = async (init?: RequestInit): Promise<RequestInit> => ({
headers: {
...init?.headers,
Authorization: `JWT ${await getToken()}`,
"x-rate-limit-skip": process.env.PAYLOAD_RATING_LIMIT_SKIP_TOKEN ?? "",
},
});