1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-02-11 10:38:52 +02:00
parent 17477c4fd7
commit d49b38b6df

View File

@ -55,9 +55,7 @@ export class JsonApi<D = JsonApiData, P extends JsonApiParams = JsonApiParams> {
} }
getResponse(path: string, params?: P, init: RequestInit = {}): Promise<Response> { getResponse(path: string, params?: P, init: RequestInit = {}): Promise<Response> {
const reqPath = `${this.config.apiBase}${path}`; let reqUrl = `${this.config.apiBase}${path}`;
//const subdomain = randomBytes(2).toString("hex");
let reqUrl = reqPath; //`http://${subdomain}.${window.location.host}${reqPath}`; // hack around browser connection limits (chromium allows 6 per domain)
const reqInit: RequestInit = { ...init }; const reqInit: RequestInit = { ...init };
const { query } = params || {} as P; const { query } = params || {} as P;
@ -73,7 +71,7 @@ export class JsonApi<D = JsonApiData, P extends JsonApiParams = JsonApiParams> {
const infoLog: JsonApiLog = { const infoLog: JsonApiLog = {
method: reqInit.method.toUpperCase(), method: reqInit.method.toUpperCase(),
reqUrl: reqPath, reqUrl,
reqInit, reqInit,
}; };