Skip to content

Commit

Permalink
Update restrictedPatternsToCreate to avoid 130 or above layer path
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-takei authored Dec 17, 2024
1 parent 84362ea commit 15f416c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/utils/page-path-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const restrictedPatternsToCreate: Array<RegExp> = [
/^\/(_search|_private-legacy-pages)(\/.*|$)/,
/^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/,
/^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1
/^(\/.+){500,}$/, // avoid deep layer path. see: https://regex101.com/r/L0kzOD/1
/^(\/.+){130,}$/, // avoid deep layer path. see: https://regex101.com/r/L0kzOD/1
];
export const isCreatablePage = (path: string): boolean => {
return !restrictedPatternsToCreate.some(pattern => path.match(pattern));
Expand Down

0 comments on commit 15f416c

Please sign in to comment.