v.21.11New Features

Add CORS Support for Serverless Requests in Grafana

Add CORS (Cross Origin Resource Sharing) support with HTTP OPTIONS request. It means, now Grafana will work with serverless requests without a kludges. Closes #18693. #29155 (Filatenkov Artur).
Added CORS (Cross-Origin Resource Sharing) support including handling of HTTP OPTIONS requests in ClickHouse, enabling smoother integration with frontend tools like Grafana.

Why it matters

This feature solves the issue of cross-origin HTTP requests being blocked by browsers when using ClickHouse with serverless frontends such as Grafana. By supporting CORS and OPTIONS preflight requests, it removes the need for workarounds, improving security and user experience.

How to use it

Enable CORS support by configuring the HTTP server settings in ClickHouse to include appropriate CORS headers. Once enabled, frontend applications like Grafana can directly communicate with ClickHouse over cross-origin requests without additional configurations.