Skip to content

Commit

Permalink
Merge pull request #188 from themoment-team/hotfix/mobileSafari
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeongrok7874 committed Oct 17, 2022
2 parents 60f2ffe + fc8c18a commit 87d2069
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/hello-gsm/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export function middleware(req: NextRequest) {
return NextResponse.redirect(`${origin}/browser`);
}

// Safari 브라우저로 접속했을 시
if (
(browser.name === 'Safari' || browser.name === 'Mobile Safari') &&
pathname !== '/browser'
) {
return NextResponse.redirect(`${origin}/browser`);
}

if (
process.env.OPERATIONAL_STATUS === 'inspection' &&
pathname !== '/inspection'
Expand All @@ -41,9 +49,4 @@ export function middleware(req: NextRequest) {
return NextResponse.redirect(origin);
}
}

// Safari 브라우저로 접속했을 시
if (browser.name === 'Safari' && pathname !== '/browser') {
return NextResponse.redirect(`${origin}/browser`);
}
}

2 comments on commit 87d2069

@vercel
Copy link

@vercel vercel bot commented on 87d2069 Oct 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hello-gsm – ./packages/hello-gsm

hello-gsm-hello-gsm.vercel.app
hello-gsm-git-main-hello-gsm.vercel.app
www.hellogsm.kr
hellogsm.kr

@vercel
Copy link

@vercel vercel bot commented on 87d2069 Oct 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hello-gsm-admin – ./packages/hello-gsm-admin

hello-gsm-admin-git-main-hello-gsm.vercel.app
admin.hellogsm.kr
hello-gsm-admin-hello-gsm.vercel.app
hello-gsm-admin.vercel.app

Please sign in to comment.