Hotfix/dos mitigation attempt error configuration (#3879)
* Fixes 'Task timed out after 60.03 seconds' * DDoS rewrite fixes Co-authored-by: zomars <zomars@me.com>pull/3883/head
parent
46715a6cd4
commit
f5b5150cf3
|
@ -141,9 +141,10 @@ const nextConfig = {
|
||||||
source: "/api/auth/:path*",
|
source: "/api/auth/:path*",
|
||||||
has: [
|
has: [
|
||||||
{
|
{
|
||||||
type: "header",
|
type: "query",
|
||||||
key: "User-Agent",
|
key: "callbackUrl",
|
||||||
value: "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
|
// prettier-ignore
|
||||||
|
value: "^(?!https?:\/\/).*$",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
destination: "/404",
|
destination: "/404",
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
import { GetServerSidePropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||||
import Button from "@calcom/ui/Button";
|
import Button from "@calcom/ui/Button";
|
||||||
import { Icon } from "@calcom/ui/Icon";
|
import { Icon } from "@calcom/ui/Icon";
|
||||||
|
|
||||||
import { useLocale } from "@lib/hooks/useLocale";
|
|
||||||
|
|
||||||
import AuthContainer from "@components/ui/AuthContainer";
|
import AuthContainer from "@components/ui/AuthContainer";
|
||||||
|
|
||||||
import { ssrInit } from "@server/lib/ssr";
|
import { ssgInit } from "@server/lib/ssg";
|
||||||
|
|
||||||
export default function Error() {
|
export default function Error() {
|
||||||
const { t } = useLocale();
|
const { t } = useLocale();
|
||||||
|
@ -40,12 +39,12 @@ export default function Error() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getServerSideProps(context: GetServerSidePropsContext) {
|
export const getStaticProps = async (context: GetStaticPropsContext) => {
|
||||||
const ssr = await ssrInit(context);
|
const ssr = await ssgInit(context);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
trpcState: ssr.dehydrate(),
|
trpcState: ssr.dehydrate(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
Loading…
Reference in New Issue