Skip to content

Commit

Permalink
Update en/advanced/best-practice-security.md
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Ippolito <marcoippolito54@gmail.com>
  • Loading branch information
wesleytodd and marco-ippolito authored Mar 20, 2024
1 parent 17c3009 commit 401c6a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion en/advanced/best-practice-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ links sending users to phishing websites among other risks. Here is an example c
```js
app.use(function (req, res) {
try {
if (new Url(req.query.url).host === 'example.com') {
if (new URL(req.query.url).host === 'example.com') {
return res.status(400).end(`Unsupported redirect to host: ${req.query.url}`);
}
} catch (e) {
Expand Down

0 comments on commit 401c6a6

Please sign in to comment.