Skip to content

Commit

Permalink
Update docs with new redirect helper
Browse files Browse the repository at this point in the history
  • Loading branch information
botv committed Jul 3, 2020
1 parent 540c229 commit 76d702c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/advanced-features/preview-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ export default async (req, res) => {

// Redirect to the path from the fetched post
// We don't redirect to req.query.slug as that might lead to open redirect vulnerabilities
res.writeHead(307, { Location: post.slug })
res.end()
res.redirect(post.slug)
}
```

Expand Down

0 comments on commit 76d702c

Please sign in to comment.