Skip to content

Commit

Permalink
Merge pull request #177 from aiji42/fix-relative-url
Browse files Browse the repository at this point in the history
Fix relative url
  • Loading branch information
aiji42 authored May 2, 2022
2 parents 8d1bf40 + a0ef154 commit 8c8eecd
Show file tree
Hide file tree
Showing 8 changed files with 3,218 additions and 5,238 deletions.
28 changes: 14 additions & 14 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
"lint": "next lint"
},
"dependencies": {
"@auth0/nextjs-auth0": "^1.6.2",
"@geist-ui/react": "^2.2.0",
"@auth0/nextjs-auth0": "^1.7.0",
"@geist-ui/react": "^2.2.5",
"@geist-ui/react-icons": "^1.0.1",
"aws-amplify": "^4.3.11",
"firebase": "^9.6.1",
"firebase-admin": "^10.0.1",
"aws-amplify": "^4.3.20",
"firebase": "^9.7.0",
"firebase-admin": "^10.1.0",
"js-cookie": "^3.0.1",
"next": "12.0.7",
"next-fortress": "^4.0.0-beta.1",
"next": "12.1.5",
"next-fortress": "4.0.1-beta.1",
"nookies": "^2.5.2",
"react": "^17.0.2",
"react-dom": "17.0.2"
"react": "^18.1.0",
"react-dom": "18.1.0"
},
"devDependencies": {
"@types/js-cookie": "^3.0.1",
"@types/react": "17.0.38",
"eslint": "8.6.0",
"eslint-config-next": "12.0.7",
"typescript": "4.5.4"
"@types/js-cookie": "^3.0.2",
"@types/react": "18.0.8",
"eslint": "8.14.0",
"eslint-config-next": "12.1.5",
"typescript": "4.6.4"
}
}
1 change: 1 addition & 0 deletions example/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Document, {
} from 'next/document'
import { CssBaseline } from '@geist-ui/react'

// @ts-ignore
class MyDocument extends Document {
static async getInitialProps(ctx: DocumentContext) {
const initialProps = await Document.getInitialProps(ctx)
Expand Down
4 changes: 3 additions & 1 deletion example/src/pages/ip/_middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export const middleware: NextMiddleware = (req, event) => {
const ips = req.cookies['__allowed_ips']
if (!ips) {
if (req.preflight) return new NextResponse(null)
return NextResponse.redirect('/ip')
const url = req.nextUrl.clone()
url.pathname = '/ip'
return NextResponse.redirect(url)
}

return makeIPInspector(ips.split(','), {
Expand Down
Loading

1 comment on commit 8c8eecd

@vercel
Copy link

@vercel vercel bot commented on 8c8eecd May 2, 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:

next-fortress – ./

next-fortress.vercel.app
next-fortress-aiji42.vercel.app
next-fortress-git-main-aiji42.vercel.app

Please sign in to comment.