Skip to content

Commit

Permalink
remove headers
Browse files Browse the repository at this point in the history
  • Loading branch information
medyo committed Jul 23, 2023
1 parent 5d0fd1d commit ade4165
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/lib/interceptors/DefaultRequestInterceptor.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import { AxiosRequestConfig } from 'axios'
import { API_ENDPOINT } from 'src/config'
import { getBrowserName, isProduction, isWebOrExtensionVersion } from 'src/utils/Environment'
import { getAppVersion } from 'src/utils/Os'
import { isProduction } from 'src/utils/Environment'

export function DefaultRequestInterceptor(config: AxiosRequestConfig) {
if (config) {
config.baseURL = isProduction() ? API_ENDPOINT : '/api'
if (config.headers) {
config.headers.Accept = 'application/json'
config.headers['App-Version'] = getAppVersion() || '0.0.0'
config.headers['App-Platform'] = isWebOrExtensionVersion()
config.headers['Browser-Name'] = getBrowserName()
}
}

Expand Down

0 comments on commit ade4165

Please sign in to comment.