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
chore: revert selector back to original
  • Loading branch information
taty2010 committed Jun 14, 2023
commit 243330d4a81e27d2b737206e72a860d3d64910c9
4 changes: 2 additions & 2 deletions demos/middleware/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function middleware(req: NextRequest) {
const message = `This was static (& escaping test &) but has been transformed in ${req.geo?.city}`

// Transform the response HTML and props
res.replaceText('h1[id=testing-rewrite]', message)
res.replaceText('#message', message)
res.setPageProp('message', message)
res.setPageProp('showAd', true)

Expand All @@ -46,7 +46,7 @@ export async function middleware(req: NextRequest) {
const message = `This was static (& escaping test &) but has been transformed in ${req.geo?.city}`

// Transform the response HTML and props
res.replaceText('h1[id=testing-rewrite]', message)
res.replaceText('#message', message)
res.setPageProp('message', message)
res.setPageProp('showAd', true)

Expand Down