Fix openapi interceptor bug

This commit is contained in:
jamesagnew 2021-05-03 08:09:58 -04:00
parent 82be821628
commit cc05ff9ad4
2 changed files with 8 additions and 0 deletions

View File

@ -198,6 +198,8 @@ public class OpenApiInterceptor {
return false;
}
}
return true;
}
if (requestPath.startsWith("/swagger-ui/")) {

View File

@ -154,6 +154,12 @@ public class OpenApiInterceptorTest {
assertEquals(400, response.getStatusLine().getStatusCode());
}
get = new HttpGet("http://localhost:" + myServer.getPort() + "/fhir?foo=foo");
get.addHeader(Constants.HEADER_ACCEPT, Constants.CT_HTML);
try (CloseableHttpResponse response = myClient.execute(get)) {
assertEquals(400, response.getStatusLine().getStatusCode());
}
}