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

Cannot intercept all routes #17

Open
JanHalozan opened this issue Apr 29, 2020 · 2 comments
Open

Cannot intercept all routes #17

JanHalozan opened this issue Apr 29, 2020 · 2 comments

Comments

@JanHalozan
Copy link

Trying to intercept all routes:

server.get("/.*") { req -> Response in
    return Response.ok("Got it")
}

doesn't work. Seems to be a bug in Regex L23: (1..<result.numberOfRanges).forEach { should it start with 0?

@OrkhanAlikhanov
Copy link
Member

Did you try following?

server.get("/{rest}") { req in
    return Response.ok("Got it")
}

@JanHalozan
Copy link
Author

But that's just a workaround. The regex should in theory catch everything but it doesn't.

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

2 participants