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>
This commit is contained in:
Alex van Andel
2022-08-16 16:02:04 -06:00
committed by zomars
co-authored by zomars
parent 79d37676fc
commit 1e5cb0bbd0
+13
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") {