Skip to content

Commit

Permalink
removed problematic path query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Dec 2, 2017
1 parent 3000cdb commit dc15630
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ Response proxyRequest(String method, ContainerRequestContext ctx) {
if (StringUtils.isBlank(appid)) {
return Response.status(Response.Status.BAD_REQUEST).build();
}
if (StringUtils.isBlank(path)) {
path = "_search";
}
try {
if ("reindex".equals(path) && POST.equals(method)) {
return handleReindexTask(appid);
Expand Down Expand Up @@ -189,7 +186,7 @@ private Header[] getHeaders(MultivaluedMap<String, String> headers) {

private String getPath(ContainerRequestContext ctx) {
String path = ctx.getUriInfo().getPathParameters(true).getFirst("path");
return StringUtils.isBlank(path) ? ctx.getUriInfo().getQueryParameters().getFirst("path") : path;
return StringUtils.isBlank(path) ? "_search" : path;
}

private Response handleReindexTask(String appid) {
Expand Down

0 comments on commit dc15630

Please sign in to comment.