Skip to content

Commit

Permalink
test: temporarily disable documentation redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
renatamottam committed Jan 15, 2025
1 parent a828ff8 commit 9fc7440
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions apps/site/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// import { NextResponse, NextRequest } from 'next/server'
import { NextResponse, NextRequest } from 'next/server'

// export function middleware(request: NextRequest) {
// const { pathname } = new URL(request.url)
// if (pathname.startsWith('/docs')) {
// return NextResponse.redirect(
// `https://developers.vtex.com/docs/guides/faststore${pathname.replace(
// '/docs',
// ''
// )}`
// )
// }
// if (pathname.startsWith('/components')) {
// return NextResponse.redirect(
// `https://developers.vtex.com/docs/guides/faststore${pathname
// .replace('/components', '')
// .replace(/\/([^\/]*)\//, '/$1-')}`
// )
// }
// return NextResponse.next()
// }
export function middleware(request: NextRequest) {
// const { pathname } = new URL(request.url)
// if (pathname.startsWith('/docs')) {
// return NextResponse.redirect(
// `https://developers.vtex.com/docs/guides/faststore${pathname.replace(
// '/docs',
// ''
// )}`
// )
// }
// if (pathname.startsWith('/components')) {
// return NextResponse.redirect(
// `https://developers.vtex.com/docs/guides/faststore${pathname
// .replace('/components', '')
// .replace(/\/([^\/]*)\//, '/$1-')}`
// )
// }
return NextResponse.next()
}

0 comments on commit 9fc7440

Please sign in to comment.