mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
refactoring
This commit is contained in:
parent
12f59f2dca
commit
a853cd57ca
@ -748,10 +748,13 @@ void HTTPHandler::processQuery(
|
||||
/// 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
|
||||
/// 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 && !request.get("Origin", "").empty())
|
||||
used_output.out->addHeaderCORS(true);
|
||||
if (!request.get("Origin", "").empty())
|
||||
{
|
||||
if (config.has("http_options_response"))
|
||||
tryAddHeadersFromConfig(response, config);
|
||||
else if (settings.add_http_cors_header)
|
||||
used_output.out->addHeaderCORS(true);
|
||||
}
|
||||
|
||||
auto append_callback = [context = context] (ProgressCallback callback)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user