Skip to content

Commit

Permalink
Paths like "/node/" should be 404
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jul 26, 2024
1 parent 6bff569 commit 1a8609a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/gql/gql-queries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export const getEntityFromPath = cache(
let entity: T | undefined
let query: RouteQuery

// Paths that start with /node/ should not be used.
if (path.startsWith("/node/")) return {}

try {
query = await graphqlClient({next: {tags: ["all-entities", `paths:${path}`]}}, previewMode).Route({path})
} catch (e) {
Expand Down

0 comments on commit 1a8609a

Please sign in to comment.