Skip to content

Commit

Permalink
Merge branch 'main' into repo-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Octomerger authored Oct 26, 2021
2 parents b9dc041 + fd9c8af commit da8c8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/handle-invalid-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function handleInvalidPaths(req, res, next) {
}

// Prevent various malicious injection attacks targeting Next.js
if (req.path.match(/^\/_next[^/]/)) {
if (req.path.match(/^\/_next[^/]/) || req.path === '/_next/data' || req.path === '/_next/data/') {
return next(404)
}

Expand Down

0 comments on commit da8c8b5

Please sign in to comment.