Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update demos/middleware/middleware.ts
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
  • Loading branch information
taty2010 and nickytonline authored Jun 23, 2023
commit 3353d66630ec0406404a33097741f8b2299789dd
2 changes: 1 addition & 1 deletion demos/middleware/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function middleware(req: NextRequest) {
}

if (pathname.startsWith('/request-rewrite')) {
// request.rewrite() should return the MiddlewareResponse obj instead of the Response obj
// request.rewrite() should return the MiddlewareResponse object instead of the Response object.
const res = await request.rewrite('/static-rewrite')
const message = `This was static (& escaping test &amp;) but has been transformed in ${req.geo?.city}`

Expand Down