Commit a631619f authored by Phillip Webb's avatar Phillip Webb

Allow subpath H2 console matching

Fixes gh-11926
parent 20ec7a6b
......@@ -70,7 +70,8 @@ public final class PathRequest {
@Override
protected void initialized(H2ConsoleProperties h2ConsoleProperties) {
this.delegate = new AntPathRequestMatcher(h2ConsoleProperties.getPath());
this.delegate = new AntPathRequestMatcher(
h2ConsoleProperties.getPath() + "/**");
}
@Override
......
......@@ -47,6 +47,7 @@ public class PathRequestTests {
public void toH2ConsoleShouldMatchH2ConsolePath() {
RequestMatcher matcher = PathRequest.toH2Console();
assertMatcher(matcher).matches("/h2-console");
assertMatcher(matcher).matches("/h2-console/subpath");
assertMatcher(matcher).doesNotMatch("/js/file.js");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment