Skip to content

Commit 236797c

Browse files
committed
added accept header for file uploads
1 parent f8b1763 commit 236797c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/widget.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,9 @@
19051905

19061906
response = await fetch(`${this.config.apiBase}/api/sources/${sourceId}/submit/`, {
19071907
method: 'POST',
1908+
headers: {
1909+
'Accept': 'application/json'
1910+
},
19081911
body: formDataToSend
19091912
// Don't set Content-Type header - browser will set it with boundary
19101913
});
@@ -1919,6 +1922,7 @@
19191922
method: 'POST',
19201923
headers: {
19211924
'Content-Type': 'application/json',
1925+
'Accept': 'application/json'
19221926
},
19231927
body: JSON.stringify(payload)
19241928
});

test/localization.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,3 +669,4 @@ describe('Language Fallback Detection', () => {
669669

670670

671671

672+

0 commit comments

Comments
 (0)