mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-27 10:28:28 +00:00
REST: Remove GET support for clear cache indices (#29525)
Clearing the cache indices can be done via GET and POST. As GET should only support read only operations, this removes the support for using GET for clearing the indices caches.
This commit is contained in:
parent
e0b8893645
commit
e1a16a6018
@ -8,4 +8,7 @@ The changes listed below have been released for the first time in Elasticsearch
|
||||
=== Breaking changes
|
||||
|
||||
Core::
|
||||
* Tribe node has been removed in favor of Cross-Cluster-Search
|
||||
* Tribe node has been removed in favor of Cross-Cluster-Search
|
||||
|
||||
Rest API::
|
||||
* The Clear Cache API only supports `POST` as HTTP method
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"indices.clear_cache": {
|
||||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html",
|
||||
"methods": ["POST", "GET"],
|
||||
"methods": ["POST"],
|
||||
"url": {
|
||||
"path": "/_cache/clear",
|
||||
"paths": ["/_cache/clear", "/{index}/_cache/clear"],
|
||||
|
@ -31,7 +31,6 @@ import org.elasticsearch.rest.action.RestToXContentListener;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.elasticsearch.rest.RestRequest.Method.GET;
|
||||
import static org.elasticsearch.rest.RestRequest.Method.POST;
|
||||
|
||||
public class RestClearIndicesCacheAction extends BaseRestHandler {
|
||||
@ -40,9 +39,6 @@ public class RestClearIndicesCacheAction extends BaseRestHandler {
|
||||
super(settings);
|
||||
controller.registerHandler(POST, "/_cache/clear", this);
|
||||
controller.registerHandler(POST, "/{index}/_cache/clear", this);
|
||||
|
||||
controller.registerHandler(GET, "/_cache/clear", this);
|
||||
controller.registerHandler(GET, "/{index}/_cache/clear", this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user