Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: path-to-regexp >= 6.3.0 Causes WebUI Not Found #15

Closed
MaikoTan opened this issue Sep 12, 2024 · 0 comments
Closed

Bug: path-to-regexp >= 6.3.0 Causes WebUI Not Found #15

MaikoTan opened this issue Sep 12, 2024 · 0 comments

Comments

@MaikoTan
Copy link

In path-to-regexp 6.3.0 version, it introduces the backtrack protection which would throw errors in such cases while the path is /vite/.+

          if (token.modifier === "+" || token.modifier === "*") {
-           route += `((?:${token.pattern})${token.modifier})`;
-         } else {
-           route += `(${token.pattern})${token.modifier}`;
+           throw new TypeError(
+             `Can not repeat "${token.name}" without a prefix and suffix`,
+           );
          }
+
+         route += `(${token.pattern})${token.modifier}`;

A temporary solution is to set the version range of the package to ^6.2.1 <=6.3.0, though.

Ref: pillarjs/path-to-regexp#324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant