[internal] 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.
This commit is contained in:
Court Ewing 2016-03-08 17:01:36 -05:00
parent 96b4519a22
commit f1c541fe94

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 ]
}
);