diff --git a/x-pack/legacy/plugins/rollup/server/routes/api/index_patterns.js b/x-pack/legacy/plugins/rollup/server/routes/api/index_patterns.js index 04c313f9b3ba1..ea72606244870 100644 --- a/x-pack/legacy/plugins/rollup/server/routes/api/index_patterns.js +++ b/x-pack/legacy/plugins/rollup/server/routes/api/index_patterns.js @@ -43,8 +43,9 @@ export function registerFieldsForWildcardRoute(server) { } = request.query; // Format call to standard index pattern `fields for wildcard` + const standardRequestQuery = querystring.stringify({ pattern, meta_fields: metaFields }); const standardRequest = { - url: `/api/index_patterns/_fields_for_wildcard?${querystring.stringify({ pattern, meta_fields: metaFields })}`, + url: `${request.getBasePath()}/api/index_patterns/_fields_for_wildcard?${standardRequestQuery}`, method: 'GET', headers: request.headers, };