Disabled this shitty rate limiter
This commit is contained in:
parent
533e182d0d
commit
c745e18b5d
|
@ -23,5 +23,3 @@ SFTP_DESTINATION_PATH_ROOT="/absolute/path/to/destination/root/folder"
|
||||||
SFTP_BASE_URL=https://base-url.com
|
SFTP_BASE_URL=https://base-url.com
|
||||||
|
|
||||||
PAYLOAD_PUBLIC_FRONTEND_BASE_URL=https://domain.com
|
PAYLOAD_PUBLIC_FRONTEND_BASE_URL=https://domain.com
|
||||||
|
|
||||||
RATING_LIMIT_SKIP_TOKEN=ratelimitskiptoken5e6ea45ef4e66eaa151612bdcb599df
|
|
|
@ -88,9 +88,7 @@ export default buildConfig({
|
||||||
disable: true,
|
disable: true,
|
||||||
},
|
},
|
||||||
rateLimit: {
|
rateLimit: {
|
||||||
window: 900_000, // 15 minutes
|
skip: () => true,
|
||||||
max: 500,
|
|
||||||
skip: (request) => request.headers["x-rate-limit-skip"] === process.env.RATING_LIMIT_SKIP_TOKEN,
|
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
cloudStorage({
|
cloudStorage({
|
||||||
|
|
|
@ -77,7 +77,6 @@ const injectAuth = async (init?: RequestInit): Promise<RequestInit> => ({
|
||||||
headers: {
|
headers: {
|
||||||
...init?.headers,
|
...init?.headers,
|
||||||
Authorization: `JWT ${await getToken()}`,
|
Authorization: `JWT ${await getToken()}`,
|
||||||
"x-rate-limit-skip": process.env.PAYLOAD_RATING_LIMIT_SKIP_TOKEN ?? "",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue