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
428 B
TypeScript
Raw Normal View History

import { AxiosInstance } from 'axios';
2025-11-18 19:52:27 +00:00
import { getBrowserId } from '@app/utils/browserIdentifier';
2025-11-18 19:52:27 +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)
);
}