Skip to content

Commit 9627c60

Browse files
committed
Merge branch 'ccr' into follower-primary-term
* ccr: [DOCS] Creates rest-api folder in docs [Rollup] Disallow index patterns that match the rollup index (elastic#30491) Replace exact numDocs by soft-del count in SegmentInfo (elastic#31086) Upgrade to Lucene-7.4.0-snapshot-0a7c3f462f (elastic#31073) Add cors support to NioHttpServerTransport (elastic#30827) [DOCS] Fixes security example (elastic#31082) Allow terms query in _rollup_search (elastic#30973) Removing erroneous repeat Adapt bwc versions after backporting elastic#30983 to 6.4 [Tests] Muting RatedRequestsTests#testXContentParsingIsNotLenient TEST: Retry synced-flush if ongoing ops on primary (elastic#30978) Fix docs build. Only auto-update license signature if all nodes ready (elastic#30859) Add BlobContainer.writeBlobAtomic() (elastic#30902) Add a doc value format to binary fields. (elastic#30860)
2 parents ddae214 + 6e109e9 commit 9627c60

File tree

123 files changed

+1995
-518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1995
-518
lines changed

buildSrc/src/main/resources/checkstyle_suppressions.xml

-2
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,6 @@
505505
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]cluster[/\\]settings[/\\]ClusterSettingsIT.java" checks="LineLength" />
506506
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]cluster[/\\]shards[/\\]ClusterSearchShardsIT.java" checks="LineLength" />
507507
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]cluster[/\\]structure[/\\]RoutingIteratorTests.java" checks="LineLength" />
508-
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]blobstore[/\\]FsBlobStoreContainerTests.java" checks="LineLength" />
509-
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]blobstore[/\\]FsBlobStoreTests.java" checks="LineLength" />
510508
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]breaker[/\\]MemoryCircuitBreakerTests.java" checks="LineLength" />
511509
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]geo[/\\]ShapeBuilderTests.java" checks="LineLength" />
512510
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]hash[/\\]MessageDigestsTests.java" checks="LineLength" />

buildSrc/version.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
elasticsearch = 7.0.0-alpha1
2-
lucene = 7.4.0-snapshot-1cbadda4d3
2+
lucene = 7.4.0-snapshot-0a7c3f462f
33

44
# optional dependencies
55
spatial4j = 0.7

docs/reference/index.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ include::{xes-repo-dir}/monitoring/index.asciidoc[]
6363

6464
include::{xes-repo-dir}/rollup/index.asciidoc[]
6565

66-
include::{xes-repo-dir}/rest-api/index.asciidoc[]
66+
include::rest-api/index.asciidoc[]
6767

6868
include::{xes-repo-dir}/commands/index.asciidoc[]
6969

docs/reference/query-dsl/query-string-syntax.asciidoc

-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ would look like this:
254254
}
255255
}
256256

257-
****
258257

259258
===== Grouping
260259

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[role="xpack"]
2+
[[xpack-api]]
3+
= {xpack} APIs
4+
5+
[partintro]
6+
--
7+
{xpack} exposes REST APIs that are used by the UI components and can be called
8+
directly to configure and access {xpack} features.
9+
10+
* <<info-api,Info API>>
11+
* <<graph-explore-api,Graph Explore API>>
12+
* <<licensing-apis,Licensing APIs>>
13+
* <<ml-apis,Machine Learning APIs>>
14+
* <<security-api,Security APIs>>
15+
* <<watcher-api,Watcher APIs>>
16+
* <<rollup-apis,Rollup APIs>>
17+
* <<migration-api,Migration APIs>>
18+
--
19+
20+
21+
include::{xes-repo-dir}/rest-api/info.asciidoc[]
22+
include::{xes-repo-dir}/rest-api/graph/explore.asciidoc[]
23+
include::{xes-repo-dir}/rest-api/licensing.asciidoc[]
24+
include::{xes-repo-dir}/rest-api/migration.asciidoc[]
25+
include::{xes-repo-dir}/rest-api/ml-api.asciidoc[]
26+
include::{xes-repo-dir}/rest-api/rollup-api.asciidoc[]
27+
include::{xes-repo-dir}/rest-api/security.asciidoc[]
28+
include::{xes-repo-dir}/rest-api/watcher.asciidoc[]
29+
include::{xes-repo-dir}/rest-api/defs.asciidoc[]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bf2cfa0551ebdf08a2cf3079f3c74643bd9dbb76

modules/lang-expression/licenses/lucene-expressions-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.

modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval/RatedRequestsTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public void testXContentRoundtrip() throws IOException {
131131
}
132132
}
133133

134+
@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/31104")
134135
public void testXContentParsingIsNotLenient() throws IOException {
135136
RatedRequest testItem = createTestItem(randomBoolean());
136137
XContentType xContentType = randomFrom(XContentType.values());

modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/cors/Netty4CorsConfig.java

+10-9
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public boolean isCorsSupportEnabled() {
7676
}
7777

7878
/**
79-
* Determines whether a wildcard origin, '*', is supported.
79+
* Determines whether a wildcard origin, '*', is supported. This also means that null origins are
80+
* supported.
8081
*
8182
* @return {@code boolean} true if any origin is allowed.
8283
*/
@@ -121,21 +122,21 @@ public boolean isNullOriginAllowed() {
121122
}
122123

123124
/**
124-
* Determines if cookies are supported for CORS requests.
125+
* Determines if credentials are supported for CORS requests.
125126
*
126-
* By default cookies are not included in CORS requests but if isCredentialsAllowed returns
127-
* true cookies will be added to CORS requests. Setting this value to true will set the
127+
* By default credentials are not included in CORS requests but if isCredentialsAllowed returns
128+
* true credentials will be added to CORS requests. Setting this value to true will set the
128129
* CORS 'Access-Control-Allow-Credentials' response header to true.
129130
*
130-
* Please note that cookie support needs to be enabled on the client side as well.
131-
* The client needs to opt-in to send cookies by calling:
131+
* Please note that credentials support needs to be enabled on the client side as well.
132+
* The client needs to opt-in to send credentials by calling:
132133
* <pre>
133134
* xhr.withCredentials = true;
134135
* </pre>
135-
* The default value for 'withCredentials' is false in which case no cookies are sent.
136-
* Setting this to true will included cookies in cross origin requests.
136+
* The default value for 'withCredentials' is false in which case no credentials are sent.
137+
* Setting this to true will included credentials in cross origin requests.
137138
*
138-
* @return {@code true} if cookies are supported.
139+
* @return {@code true} if credentials are supported.
139140
*/
140141
public boolean isCredentialsAllowed() {
141142
return allowCredentials;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
82d83fcac1d9c8948aa0247fc9c87f177ddbd59b

plugins/analysis-icu/licenses/lucene-analyzers-icu-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
73fd4364f2931e7c8303b5927e140a7d21116c36

plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0a2c4417fa9a8be078864f590a5a66b98d551cf5

plugins/analysis-nori/licenses/lucene-analyzers-nori-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6fa179924f139a30fc0e5399256e1a44562ed32b

plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5ed135d34d7868b71a725257a46dc8d8735a15d4

plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
875911b36b99c2103719f94559878a0ecb862fb6

plugins/analysis-stempel/licenses/lucene-analyzers-stempel-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e7191628df8cb72382a20da79224aef677117849

plugins/analysis-ukrainian/licenses/lucene-analyzers-morfologik-7.4.0-snapshot-1cbadda4d3.jar.sha1

-1
This file was deleted.

plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/HttpReadWriteHandler.java

+12-3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
3737
import org.elasticsearch.http.HttpHandlingSettings;
3838
import org.elasticsearch.http.HttpPipelinedRequest;
39+
import org.elasticsearch.http.nio.cors.NioCorsConfig;
40+
import org.elasticsearch.http.nio.cors.NioCorsHandler;
3941
import org.elasticsearch.nio.FlushOperation;
4042
import org.elasticsearch.nio.InboundChannelBuffer;
4143
import org.elasticsearch.nio.NioSocketChannel;
@@ -50,21 +52,25 @@
5052
import java.util.List;
5153
import java.util.function.BiConsumer;
5254

55+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ENABLED;
56+
5357
public class HttpReadWriteHandler implements ReadWriteHandler {
5458

5559
private final NettyAdaptor adaptor;
5660
private final NioSocketChannel nioChannel;
5761
private final NioHttpServerTransport transport;
5862
private final HttpHandlingSettings settings;
5963
private final NamedXContentRegistry xContentRegistry;
64+
private final NioCorsConfig corsConfig;
6065
private final ThreadContext threadContext;
6166

6267
HttpReadWriteHandler(NioSocketChannel nioChannel, NioHttpServerTransport transport, HttpHandlingSettings settings,
63-
NamedXContentRegistry xContentRegistry, ThreadContext threadContext) {
68+
NamedXContentRegistry xContentRegistry, NioCorsConfig corsConfig, ThreadContext threadContext) {
6469
this.nioChannel = nioChannel;
6570
this.transport = transport;
6671
this.settings = settings;
6772
this.xContentRegistry = xContentRegistry;
73+
this.corsConfig = corsConfig;
6874
this.threadContext = threadContext;
6975

7076
List<ChannelHandler> handlers = new ArrayList<>(5);
@@ -78,6 +84,9 @@ public class HttpReadWriteHandler implements ReadWriteHandler {
7884
if (settings.isCompression()) {
7985
handlers.add(new HttpContentCompressor(settings.getCompressionLevel()));
8086
}
87+
if (settings.isCorsEnabled()) {
88+
handlers.add(new NioCorsHandler(corsConfig));
89+
}
8190
handlers.add(new NioHttpPipeliningHandler(transport.getLogger(), settings.getPipeliningMaxEvents()));
8291

8392
adaptor = new NettyAdaptor(handlers.toArray(new ChannelHandler[0]));
@@ -178,7 +187,7 @@ private void handleRequest(Object msg) {
178187
int sequence = pipelinedRequest.getSequence();
179188
BigArrays bigArrays = transport.getBigArrays();
180189
try {
181-
innerChannel = new NioHttpChannel(nioChannel, bigArrays, httpRequest, sequence, settings, threadContext);
190+
innerChannel = new NioHttpChannel(nioChannel, bigArrays, httpRequest, sequence, settings, corsConfig, threadContext);
182191
} catch (final IllegalArgumentException e) {
183192
if (badRequestCause == null) {
184193
badRequestCause = e;
@@ -191,7 +200,7 @@ private void handleRequest(Object msg) {
191200
Collections.emptyMap(), // we are going to dispatch the request as a bad request, drop all parameters
192201
copiedRequest.uri(),
193202
copiedRequest);
194-
innerChannel = new NioHttpChannel(nioChannel, bigArrays, innerRequest, sequence, settings, threadContext);
203+
innerChannel = new NioHttpChannel(nioChannel, bigArrays, innerRequest, sequence, settings, corsConfig, threadContext);
195204
}
196205
channel = innerChannel;
197206
}

plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpChannel.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
import org.elasticsearch.common.util.BigArrays;
4242
import org.elasticsearch.common.util.concurrent.ThreadContext;
4343
import org.elasticsearch.http.HttpHandlingSettings;
44+
import org.elasticsearch.http.nio.cors.NioCorsConfig;
45+
import org.elasticsearch.http.nio.cors.NioCorsHandler;
4446
import org.elasticsearch.nio.NioSocketChannel;
4547
import org.elasticsearch.rest.AbstractRestChannel;
4648
import org.elasticsearch.rest.RestResponse;
@@ -58,17 +60,19 @@ public class NioHttpChannel extends AbstractRestChannel {
5860

5961
private final BigArrays bigArrays;
6062
private final int sequence;
63+
private final NioCorsConfig corsConfig;
6164
private final ThreadContext threadContext;
6265
private final FullHttpRequest nettyRequest;
6366
private final NioSocketChannel nioChannel;
6467
private final boolean resetCookies;
6568

6669
NioHttpChannel(NioSocketChannel nioChannel, BigArrays bigArrays, NioHttpRequest request, int sequence,
67-
HttpHandlingSettings settings, ThreadContext threadContext) {
70+
HttpHandlingSettings settings, NioCorsConfig corsConfig, ThreadContext threadContext) {
6871
super(request, settings.getDetailedErrorsEnabled());
6972
this.nioChannel = nioChannel;
7073
this.bigArrays = bigArrays;
7174
this.sequence = sequence;
75+
this.corsConfig = corsConfig;
7276
this.threadContext = threadContext;
7377
this.nettyRequest = request.getRequest();
7478
this.resetCookies = settings.isResetCookies();
@@ -87,6 +91,8 @@ public void sendResponse(RestResponse response) {
8791
}
8892
resp.setStatus(getStatus(response.status()));
8993

94+
NioCorsHandler.setCorsResponseHeaders(nettyRequest, resp, corsConfig);
95+
9096
String opaque = nettyRequest.headers().get("X-Opaque-Id");
9197
if (opaque != null) {
9298
setHeaderField(resp, "X-Opaque-Id", opaque);

plugins/transport-nio/src/main/java/org/elasticsearch/http/nio/NioHttpServerTransport.java

+50-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.elasticsearch.http.nio;
2121

22+
import io.netty.handler.codec.http.HttpMethod;
2223
import io.netty.handler.timeout.ReadTimeoutException;
2324
import org.apache.logging.log4j.Logger;
2425
import org.apache.logging.log4j.message.ParameterizedMessage;
@@ -28,6 +29,7 @@
2829
import org.elasticsearch.action.ActionFuture;
2930
import org.elasticsearch.action.ActionListener;
3031
import org.elasticsearch.action.support.PlainActionFuture;
32+
import org.elasticsearch.common.Strings;
3133
import org.elasticsearch.common.network.NetworkAddress;
3234
import org.elasticsearch.common.network.NetworkService;
3335
import org.elasticsearch.common.settings.Setting;
@@ -38,11 +40,13 @@
3840
import org.elasticsearch.common.util.BigArrays;
3941
import org.elasticsearch.common.util.concurrent.EsExecutors;
4042
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
43+
import org.elasticsearch.http.AbstractHttpServerTransport;
4144
import org.elasticsearch.http.BindHttpException;
4245
import org.elasticsearch.http.HttpHandlingSettings;
4346
import org.elasticsearch.http.HttpServerTransport;
4447
import org.elasticsearch.http.HttpStats;
45-
import org.elasticsearch.http.AbstractHttpServerTransport;
48+
import org.elasticsearch.http.nio.cors.NioCorsConfig;
49+
import org.elasticsearch.http.nio.cors.NioCorsConfigBuilder;
4650
import org.elasticsearch.nio.AcceptingSelector;
4751
import org.elasticsearch.nio.AcceptorEventHandler;
4852
import org.elasticsearch.nio.BytesChannelContext;
@@ -56,6 +60,7 @@
5660
import org.elasticsearch.nio.SocketChannelContext;
5761
import org.elasticsearch.nio.SocketEventHandler;
5862
import org.elasticsearch.nio.SocketSelector;
63+
import org.elasticsearch.rest.RestUtils;
5964
import org.elasticsearch.threadpool.ThreadPool;
6065

6166
import java.io.IOException;
@@ -64,15 +69,23 @@
6469
import java.nio.channels.ServerSocketChannel;
6570
import java.nio.channels.SocketChannel;
6671
import java.util.ArrayList;
72+
import java.util.Arrays;
6773
import java.util.Collections;
6874
import java.util.List;
6975
import java.util.Set;
7076
import java.util.concurrent.ConcurrentHashMap;
7177
import java.util.concurrent.atomic.AtomicReference;
7278
import java.util.function.Consumer;
79+
import java.util.regex.Pattern;
7380

7481
import static org.elasticsearch.common.settings.Setting.intSetting;
7582
import static org.elasticsearch.common.util.concurrent.EsExecutors.daemonThreadFactory;
83+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_CREDENTIALS;
84+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_HEADERS;
85+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_METHODS;
86+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_ORIGIN;
87+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ENABLED;
88+
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_MAX_AGE;
7689
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION;
7790
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION_LEVEL;
7891
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_DETAILED_ERRORS_ENABLED;
@@ -86,6 +99,7 @@
8699
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_TCP_REUSE_ADDRESS;
87100
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_TCP_SEND_BUFFER_SIZE;
88101
import static org.elasticsearch.http.HttpTransportSettings.SETTING_PIPELINING_MAX_EVENTS;
102+
import static org.elasticsearch.http.nio.cors.NioCorsHandler.ANY_ORIGIN;
89103

90104
public class NioHttpServerTransport extends AbstractHttpServerTransport {
91105

@@ -115,6 +129,7 @@ public class NioHttpServerTransport extends AbstractHttpServerTransport {
115129
private final Set<NioSocketChannel> socketChannels = Collections.newSetFromMap(new ConcurrentHashMap<>());
116130
private NioGroup nioGroup;
117131
private HttpChannelFactory channelFactory;
132+
private final NioCorsConfig corsConfig;
118133

119134
public NioHttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool,
120135
NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher) {
@@ -136,6 +151,7 @@ public NioHttpServerTransport(Settings settings, NetworkService networkService,
136151
SETTING_HTTP_COMPRESSION_LEVEL.get(settings),
137152
SETTING_HTTP_DETAILED_ERRORS_ENABLED.get(settings),
138153
pipeliningMaxEvents);
154+
this.corsConfig = buildCorsConfig(settings);
139155

140156
this.tcpNoDelay = SETTING_HTTP_TCP_NO_DELAY.get(settings);
141157
this.tcpKeepAlive = SETTING_HTTP_TCP_KEEP_ALIVE.get(settings);
@@ -279,6 +295,38 @@ protected void nonChannelExceptionCaught(Exception ex) {
279295
logger.warn(new ParameterizedMessage("exception caught on transport layer [thread={}]", Thread.currentThread().getName()), ex);
280296
}
281297

298+
static NioCorsConfig buildCorsConfig(Settings settings) {
299+
if (SETTING_CORS_ENABLED.get(settings) == false) {
300+
return NioCorsConfigBuilder.forOrigins().disable().build();
301+
}
302+
String origin = SETTING_CORS_ALLOW_ORIGIN.get(settings);
303+
final NioCorsConfigBuilder builder;
304+
if (Strings.isNullOrEmpty(origin)) {
305+
builder = NioCorsConfigBuilder.forOrigins();
306+
} else if (origin.equals(ANY_ORIGIN)) {
307+
builder = NioCorsConfigBuilder.forAnyOrigin();
308+
} else {
309+
Pattern p = RestUtils.checkCorsSettingForRegex(origin);
310+
if (p == null) {
311+
builder = NioCorsConfigBuilder.forOrigins(RestUtils.corsSettingAsArray(origin));
312+
} else {
313+
builder = NioCorsConfigBuilder.forPattern(p);
314+
}
315+
}
316+
if (SETTING_CORS_ALLOW_CREDENTIALS.get(settings)) {
317+
builder.allowCredentials();
318+
}
319+
String[] strMethods = Strings.tokenizeToStringArray(SETTING_CORS_ALLOW_METHODS.get(settings), ",");
320+
HttpMethod[] methods = Arrays.stream(strMethods)
321+
.map(HttpMethod::valueOf)
322+
.toArray(HttpMethod[]::new);
323+
return builder.allowedRequestMethods(methods)
324+
.maxAge(SETTING_CORS_MAX_AGE.get(settings))
325+
.allowedRequestHeaders(Strings.tokenizeToStringArray(SETTING_CORS_ALLOW_HEADERS.get(settings), ","))
326+
.shortCircuit()
327+
.build();
328+
}
329+
282330
private void closeChannels(List<NioChannel> channels) {
283331
List<ActionFuture<Void>> futures = new ArrayList<>(channels.size());
284332

@@ -315,7 +363,7 @@ private HttpChannelFactory() {
315363
public NioSocketChannel createChannel(SocketSelector selector, SocketChannel channel) throws IOException {
316364
NioSocketChannel nioChannel = new NioSocketChannel(channel);
317365
HttpReadWriteHandler httpReadWritePipeline = new HttpReadWriteHandler(nioChannel,NioHttpServerTransport.this,
318-
httpHandlingSettings, xContentRegistry, threadPool.getThreadContext());
366+
httpHandlingSettings, xContentRegistry, corsConfig, threadPool.getThreadContext());
319367
Consumer<Exception> exceptionHandler = (e) -> exceptionCaught(nioChannel, e);
320368
SocketChannelContext context = new BytesChannelContext(nioChannel, selector, exceptionHandler, httpReadWritePipeline,
321369
InboundChannelBuffer.allocatingInstance());

0 commit comments

Comments
 (0)