Merge pull request #59311 from ClickHouse/binary-allow-user-host-password

`/binary` handler: allow specifying user/password/host
This commit is contained in:
Alexey Milovidov 2024-01-28 20:33:39 +01:00 committed by GitHub
commit 77de2b0ebc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,10 +60,16 @@
/// If it is hosted on server, assume that it is the address of ClickHouse. /// If it is hosted on server, assume that it is the address of ClickHouse.
if (location.protocol != 'file:') { if (location.protocol != 'file:') {
host = location.origin; host = location.origin;
user = 'default';
add_http_cors_header = false; add_http_cors_header = false;
} }
if (window.location.search) {
const params = new URLSearchParams(window.location.search);
if (params.has('host')) { host = params.get('host'); }
if (params.has('user')) { user = params.get('user'); }
if (params.has('password')) { password = params.get('password'); }
}
let map = L.map('space', { let map = L.map('space', {
crs: L.CRS.Simple, crs: L.CRS.Simple,
center: [-512, 512], center: [-512, 512],