Skip to content

Commit

Permalink
Merge pull request #142 from DataDog/loic/fix-sourcemaps-upload
Browse files Browse the repository at this point in the history
Fix sourcemaps upload size limit.
  • Loading branch information
lraucy authored Jan 11, 2021
2 parents 9b8c527 + fa7f383 commit f098aa0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/sourcemaps/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {getRequestBuilder} from '../../helpers/utils'
import {Payload} from './interfaces'
import {renderUpload} from './renderer'

// Dependcy follows-redirects sets a default maxBodyLentgh of 10 MB https://github.com/follow-redirects/follow-redirects/blob/b774a77e582b97174813b3eaeb86931becba69db/index.js#L391
// Dependency follows-redirects sets a default maxBodyLength of 10 MB https://github.com/follow-redirects/follow-redirects/blob/b774a77e582b97174813b3eaeb86931becba69db/index.js#L391
// We don't want any hard limit enforced by the CLI, the backend will enforce a max size by returning 413 errors.
const maxContentLength = Infinity
const maxBodyLength = Infinity

export const uploadSourcemap = (request: (args: AxiosRequestConfig) => AxiosPromise<AxiosResponse>) => async (
sourcemap: Payload,
Expand All @@ -28,7 +28,7 @@ export const uploadSourcemap = (request: (args: AxiosRequestConfig) => AxiosProm
return request({
data: form,
headers: form.getHeaders(),
maxContentLength,
maxBodyLength,
method: 'POST',
url: 'v1/input',
})
Expand Down

0 comments on commit f098aa0

Please sign in to comment.