diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 9ba4561ceb..b3b90dd905 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -112,12 +112,22 @@ jobs: docker container run -d --name test -p 8080:8080 ${{ matrix.versions.IMAGES[0] }} timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/; do sleep 1; done' timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/mappings; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/matched; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/unmatched; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/state; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/files; do sleep 1; done' docker container rm -f test # version docker container run -d --name test -p 8080:8080 ${{ matrix.versions.IMAGES[1] }} timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/; do sleep 1; done' timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/mappings; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/matched; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/unmatched; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/state; do sleep 1; done' + timeout 10 bash -c 'while ! curl --fail http://localhost:8080/__admin/webapp/files; do sleep 1; done' docker container rm -f test - name: Push wiremock-gui image to Docker HUB diff --git a/build.gradle b/build.gradle index 1c2274c4e4..ade99f5fcf 100644 --- a/build.gradle +++ b/build.gradle @@ -66,9 +66,9 @@ dependencies { } api platform("com.fasterxml.jackson:jackson-bom:$versions.jackson") api "com.fasterxml.jackson.core:jackson-core", - "com.fasterxml.jackson.core:jackson-annotations", - "com.fasterxml.jackson.core:jackson-databind", - "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" + "com.fasterxml.jackson.core:jackson-annotations", + "com.fasterxml.jackson.core:jackson-databind", + "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" api "org.apache.httpcomponents.client5:httpclient5:5.2.1" api "org.xmlunit:xmlunit-core:$versions.xmlUnit" api "org.xmlunit:xmlunit-legacy:$versions.xmlUnit", { diff --git a/src/main/java/com/github/tomakehurst/wiremock/jetty/JettyHttpServer.java b/src/main/java/com/github/tomakehurst/wiremock/jetty/JettyHttpServer.java index a31cc3b15e..aea42f2ece 100644 --- a/src/main/java/com/github/tomakehurst/wiremock/jetty/JettyHttpServer.java +++ b/src/main/java/com/github/tomakehurst/wiremock/jetty/JettyHttpServer.java @@ -153,7 +153,8 @@ public void handle( handlers.setHandlers( ArrayUtils.addAll(extensionHandlers(), adminContext, asyncTimeoutSettingHandler)); - // We prepend the rewrite handle for the wiremock gui web app to make sure that we route the requests properly + // We prepend the rewrite handle for the wiremock gui web app to make sure that we route the + // requests properly final RewriteHandler rewriteHandler = webAppRewriteContext(adminContext); handlers.prependHandler(rewriteHandler); @@ -396,10 +397,10 @@ private ServletContextHandler addAdminContext( // Include wiremock-gui websocket into admin context JakartaWebSocketServletContainerInitializer.configure( - adminContext, - (servletContext, serverContainer) -> { - serverContainer.addEndpoint(WebSocketEndpoint.class); - }); + adminContext, + (servletContext, serverContainer) -> { + serverContainer.addEndpoint(WebSocketEndpoint.class); + }); decorateAdminServiceContextAfterConfig(adminContext); @@ -413,8 +414,8 @@ protected void decorateAdminServiceContextAfterConfig( ServletContextHandler adminServiceContext) {} /** - * Rewrite web app. We use Angular. We must rewrite every /__admin/webapp path to the index.html of our - * single page application. + * Rewrite web app. We use Angular. We must rewrite every /__admin/webapp path to the index.html + * of our single page application. * * @param adminContextHandler admin context handler is used to provide the static file content * @return the rewrite handler @@ -425,7 +426,7 @@ private RewriteHandler webAppRewriteContext(ServletContextHandler adminContextHa rewrite.setRewritePathInfo(true); RewriteRegexRule rewriteRule = new RewriteRegexRule(); - rewriteRule.setRegex("/__admin/webapp/(mappings|matched|unmatched|state).*"); + rewriteRule.setRegex("/__admin/webapp/(mappings|matched|unmatched|state|files).*"); rewriteRule.setReplacement("/__admin/webapp/index.html"); rewrite.addRule(rewriteRule);