mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
refactor
This commit is contained in:
parent
473f7bee3a
commit
12f59f2dca
@ -18,10 +18,7 @@
|
||||
first_or_random - if first replica one has higher number of errors, pick a random one from replicas with minimum number of errors.
|
||||
-->
|
||||
<load_balancing>random</load_balancing>
|
||||
|
||||
<!-- Turn on this setting for CORS headers. -->
|
||||
<!-- add_http_cors_header>1</add_http_cors_header -->
|
||||
</default>
|
||||
</default>
|
||||
|
||||
<!-- Profile that allows only read queries. -->
|
||||
<readonly>
|
||||
|
@ -746,12 +746,12 @@ void HTTPHandler::processQuery(
|
||||
static_cast<CompressedReadBuffer &>(*in_post_maybe_compressed).disableChecksumming();
|
||||
|
||||
/// Add CORS header if 'add_http_cors_header' setting is turned on send * in Access-Control-Allow-Origin,
|
||||
/// or if config has http_options_response, which means that there
|
||||
/// or if config has http_options_response, which means that there
|
||||
/// are some headers to be sent, and the client passed Origin header.
|
||||
if (config.has("http_options_response") && !request.get("Origin", "").empty())
|
||||
tryAddHeadersFromConfig(response, config);
|
||||
else if (settings.add_http_cors_header)
|
||||
used_output.out->addHeaderCORS(settings.add_http_cors_header && !request.get("Origin", "").empty());
|
||||
else if (settings.add_http_cors_header && !request.get("Origin", "").empty())
|
||||
used_output.out->addHeaderCORS(true);
|
||||
|
||||
auto append_callback = [context = context] (ProgressCallback callback)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user