Rename proxy restriction function for clarity

This is a private function to the elasticsearch index file, but the name
"noCreateIndex" was misleading because it actually restricts any access
to the direct index rather than only creates.

Fixes #6477
This commit is contained in:
Court Ewing 2016-03-08 17:01:36 -05:00 committed by courtewing
parent 420d5fbd12
commit d3f5bf886d

View file

@ -54,7 +54,7 @@ module.exports = function ({ Plugin }) {
return reply.continue();
}
function noCreateIndex({ path }, reply) {
function noDirectIndex({ path }, reply) {
const requestPath = trimRight(trim(path), '/');
const matchPath = createPath(kibanaIndex);
@ -75,7 +75,7 @@ module.exports = function ({ Plugin }) {
['PUT', 'POST', 'DELETE'],
`/${kibanaIndex}/{paths*}`,
{
pre: [ noCreateIndex, noBulkCheck ]
pre: [ noDirectIndex, noBulkCheck ]
}
);