MCPcopy Create free account
hub / github.com/ShipSecAI/studio / buildHeaders

Method buildHeaders

backend/src/trace/log-stream.service.ts:352–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

350 }
351
352 private buildHeaders(): Record<string, string> {
353 const headers: Record<string, string> = {
354 'Content-Type': 'application/json',
355 };
356
357 if (this.tenantId) {
358 headers['X-Scope-OrgID'] = this.tenantId;
359 }
360
361 if (this.username && this.password) {
362 const credentials = Buffer.from(`${this.username}:${this.password}`).toString('base64');
363 headers.Authorization = `Basic ${credentials}`;
364 }
365
366 return headers;
367 }
368
369 private resolveUrl(path: string): string {
370 const base = (this.baseUrl ?? '').replace(/\/+$/, '');

Callers 3

queryLokiMethod · 0.95
queryLokiTimeRangeMethod · 0.95
queryLokiRangeMethod · 0.95

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected