Просмотр исходного кода

Update restrictedPatternsToCreate to avoid 130 or above layer path

Yuki Takei 1 год назад
Родитель
Сommit
15f416cfb3
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/core/src/utils/page-path-utils/index.ts

+ 1 - 1
packages/core/src/utils/page-path-utils/index.ts

@@ -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));