diff --git a/mosu-app/src/pages/notice/new.tsx b/mosu-app/src/pages/notice/new.tsx index ed62acd8..681b2a35 100644 --- a/mosu-app/src/pages/notice/new.tsx +++ b/mosu-app/src/pages/notice/new.tsx @@ -27,7 +27,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => props: { profileData }, }; } catch (error) { - if (error instanceof UnauthorizedException || error instanceof ForbiddenException) { + if (error instanceof UnauthorizedException) { return { redirect: { destination: "/auth/member/signin?returnUrl=/notice/new", @@ -41,6 +41,13 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => permanent: false, }, }; + } else { + return { + redirect: { + destination: "/auth/member/signin?returnUrl=/notice/new", + permanent: false, + }, + }; } } };