Attempt at redirect to 404 (#3877)

* Attempt at redirect to 404

404 should be able to handle the traffic no problem - better ideas welcome. Just a temp fix I imagine; we're not going to want to keep this nor can we expect the User-Agent to continue identifying the traffic source.

* Update next.config.js

Co-authored-by: zomars <zomars@me.com>
pull/3210/head
Alex van Andel 2022-08-16 23:01:38 +01:00 committed by GitHub
parent 4df54ef3d1
commit 3a54ca2c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -136,6 +136,19 @@ const nextConfig = {
destination: "/video/:path*",
permanent: false,
},
/* Attempt to mitigate DDoS attack */
{
source: "/api/auth/:path*",
has: [
{
type: "header",
key: "User-Agent",
value: "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
},
],
destination: "/404",
permanent: false,
},
];
if (process.env.NEXT_PUBLIC_WEBAPP_URL === "https://app.cal.com") {