Scheduling infrastructure for absolutely everyone.
Hotfix/dos mitigation attempt error configuration (#3879)
Alex van Andelf5b5150cf3e5
diff --git a/apps/web/next.config.js b/apps/web/next.config.jsindex 7f273e055fc..bb1b38a732a 100644--- a/apps/web/next.config.js+++ b/apps/web/next.config.js@@ -141,9 +141,10 @@ const nextConfig = {source: "/api/auth/:path*",has: [{- type: "header",- key: "User-Agent",- value: "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",+ type: "query",+ key: "callbackUrl",+ // prettier-ignore+ value: "^(?!https?:\/\/).*$",},],destination: "/404",diff --git a/apps/web/pages/auth/error.tsx b/apps/web/pages/auth/error.tsxindex df6aa2f528c..bfb363e919e 100644--- a/apps/web/pages/auth/error.tsx+++ b/apps/web/pages/auth/error.tsx@@ -1,15 +1,14 @@-import { GetServerSidePropsContext } from "next";+import { GetStaticPropsContext } from "next";import Link from "next/link";import { useRouter } from "next/router";+import { useLocale } from "@calcom/lib/hooks/useLocale";import Button from "@calcom/ui/Button";import { Icon } from "@calcom/ui/Icon";-import { useLocale } from "@lib/hooks/useLocale";-import AuthContainer from "@components/ui/AuthContainer";-import { ssrInit } from "@server/lib/ssr";+import { ssgInit } from "@server/lib/ssg";export default function Error() {const { t } = useLocale();@@ -40,12 +39,12 @@ export default function Error() {);}-export async function getServerSideProps(context: GetServerSidePropsContext) {- const ssr = await ssrInit(context);+export const getStaticProps = async (context: GetStaticPropsContext) => {+ const ssr = await ssgInit(context);return {props: {trpcState: ssr.dehydrate(),},};-}+};