Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save paulrblakey/6580888 to your computer and use it in GitHub Desktop.
Save paulrblakey/6580888 to your computer and use it in GitHub Desktop.
Elasticsearch head request returns 403 on read_only index
## input some test data into an index
curl -X POST http://127.0.0.1:9200/testindex/testtype/1 -d'
{
"title":"titletest",
"description":"testdescription"
}'
## make a head request to the index
curl -I http://127.0.0.1:9200/testindex
## should return 200
## make the index read_only
curl -XPUT http://127.0.0.1:9200/testindex/_settings -d'
{
"index":{
"blocks":{
"read_only":true
}
}
}'
## make a head request to the index again.
curl -I http://127.0.0.1:9200/testindex
## returns 403 :\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment