8000 added comment about how to change elasticsearch settings · nibin/elasticsearch-http-basic@2c7765d · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c7765d

Browse files
author
Peter
committed
added comment about how to change elasticsearch settings
1 parent 04ce099 commit 2c7765d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/asquera/elasticsearch/plugins/http/HttpBasicServer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ private boolean isInIPWhitelist(HttpRequest request) {
122122
* specification mandates that browsers “preflight” the request, soliciting
123123
* supported methods from the server with an HTTP OPTIONS request
124124
*/
125-
private boolean allowOptionsForCORS(HttpRequest request) {
125+
private boolean allowOptionsForCORS(HttpRequest request) {
126+
// in elasticsearch.yml set
127+
// http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, Authorization"
126128
if(request.method() == Method.OPTIONS) {
127129
Loggers.getLogger(getClass()).error("CORS type {}, address {}, path {}, request {}, content {}",
128130
request.method(), getAddress(request), request.path(), request.params(), request.content().toUtf8());

0 commit comments

Comments
 (0)
0