Files
Stirling-PDF/frontend/src/core/services/apiClientSetup.ts
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
433 B
TypeScript
Raw Normal View History

import type { AxiosInstance } from 'axios';
2025-11-19 12:35:35 +00:00
import { getBrowserId } from '@app/utils/browserIdentifier';
2025-11-19 12:35:35 +00:00
export function setupApiInterceptors(client: AxiosInstance): void {
// Add browser ID header for WAU tracking
client.interceptors.request.use(
(config) => {
const browserId = getBrowserId();
config.headers['X-Browser-Id'] = browserId;
return config;
},
(error) => Promise.reject(error)
);
}