Skip to content

Commit

Permalink
EXUI-266: Update deployment id reference in index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Elliott authored and Tom Elliott committed Aug 21, 2023
1 parent d43059e commit fd3cfad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/lib/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import axios, { AxiosInstance } from 'axios';
import { errorInterceptor, requestInterceptor, successInterceptor } from '../interceptors';

export const http: AxiosInstance = axios.create({});
const deploymentId: string = process.env.DEPLOYMENT_ID;
const previewDeploymentId: string = process.env.PREVIEW_DEPLOYMENT_ID;

if (deploymentId) {
axios.defaults.headers.common['hmcts-deployment-id'] = deploymentId;
if (previewDeploymentId) {
axios.defaults.headers.common['hmcts-deployment-id'] = previewDeploymentId;
}
axios.defaults.headers.common['Content-Type'] = 'application/json';
http.interceptors.request.use(requestInterceptor);
Expand Down

0 comments on commit fd3cfad

Please sign in to comment.