Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Su <[email protected]>
  • Loading branch information
zhongnansu committed Mar 20, 2023
1 parent 7422ab7 commit 9842874
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ export const createHandler = ({
}: RouteDependencies): RequestHandler<unknown, Query, Body> => async (ctx, request, response) => {
const { body, query } = request;
const { path, method } = query;
const client = ctx.core.opensearch.client.asCurrentUser;

let opensearchResponse: ApiResponse;

const client = ctx.core.opensearch.client.asCurrentUser;

if (!pathFilters.some((re) => re.test(path))) {
return response.forbidden({
body: `Error connecting to '${path}':\n\nUnable to send requests to that path.`,
Expand Down

0 comments on commit 9842874

Please sign in to comment.