Skip to content

Commit

Permalink
Prevent http client from converting our form data
Browse files Browse the repository at this point in the history
If we don't specify an undefined content-type like so, the client
attempts to convert our form data into a JSON string, and the backend
returns an understandable 415.

This fixes rule imports.
  • Loading branch information
rylnd committed Feb 4, 2020
1 parent e510484 commit 6aecb23
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export const importRules = async ({
`${DETECTION_ENGINE_RULES_URL}/_import`,
{
method: 'POST',
headers: { 'Content-Type': undefined },
query: { overwrite },
body: formData,
asResponse: true,
Expand Down

0 comments on commit 6aecb23

Please sign in to comment.