Hijack the DELETE .watches index delete endpoint.

This change disables the DELETE .watches index endpoint.

Fixes: elastic/elasticsearch#439

Original commit: elastic/x-pack-elasticsearch@2e66cd55fa
This commit is contained in:
Brian Murphy 2015-05-08 10:39:06 -04:00
parent 8bc238e10a
commit 4c939a7c3d
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,11 @@
type: "watch"
id: "foo"
- do:
catch: /not supported/
indices.delete:
index: ".watches"
- do:
catch: /not supported/
update:

View File

@ -37,6 +37,7 @@ public class RestHijackOperationAction extends WatcherRestHandler {
controller.registerHandler(RestRequest.Method.POST, WatchStore.INDEX + "/_bulk", unsupportedHandler);
controller.registerHandler(RestRequest.Method.PUT, WatchStore.INDEX + "/watch/_bulk", unsupportedHandler);
controller.registerHandler(RestRequest.Method.PUT, WatchStore.INDEX + "/_bulk", unsupportedHandler);
controller.registerHandler(RestRequest.Method.DELETE, WatchStore.INDEX, unsupportedHandler);
}
}