Created
September 16, 2013 13:46
-
-
Save paulrblakey/6580888 to your computer and use it in GitHub Desktop.
Elasticsearch head request returns 403 on read_only index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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