Skip to content

Commit

Permalink
condition sessionId trace on consent
Browse files Browse the repository at this point in the history
  • Loading branch information
andracc committed Dec 10, 2024
1 parent 2abf257 commit ab63bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const whiteListedErrorUrls = [
// Create an axios instance to allow for attaching interceptors to it.
const axiosInstance = axios.create({ baseURL: apiBaseURL });
axiosInstance.interceptors.request.use((config: InternalAxiosRequestConfig) => {
config.headers.sessionId = getSessionId();
LocalStorage.getCurrentUser()?.otelConsent
? (config.headers.otelConsent = true)
? ((config.headers.otelConsent = true),
(config.headers.sessionId = getSessionId()))
: (config.headers.otelConsent = false);
return config;
});
Expand Down

0 comments on commit ab63bbe

Please sign in to comment.