There was an error while loading. Please reload this page.
1 parent a678b48 commit 1ca3bfbCopy full SHA for 1ca3bfb
1 file changed
src/content/pages/en/advanced/best-practice-security.mdx
@@ -64,7 +64,7 @@ Here is an example of checking URLs before using `res.redirect` or `res.location
64
```js
65
app.use((req, res) => {
66
try {
67
- if (new Url(req.query.url).host !== 'example.com') {
+ if (new URL(req.query.url).host !== 'example.com') {
68
return res.status(400).end(`Unsupported redirect to host: ${req.query.url}`);
69
}
70
} catch (e) {
0 commit comments