Skip to content

Commit 88e39df

Browse files
authoredOct 27, 2020
fix(ios): remove hardcoded X-Requested-With header (#287)
no other platform sets this header and it should be up to the user if it's desired to 'disguise' the HTTP call as an XMLHttpRequest
1 parent dcae926 commit 88e39df

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed
 

‎src/ios/CDVFileTransfer.m

-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ - (NSString*)escapePathComponentForUrlString:(NSString*)urlString
102102

103103
- (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLRequest*)req
104104
{
105-
[req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];
106-
107105
for (NSString* headerName in headers) {
108106
id value = [headers objectForKey:headerName];
109107
if (!value || (value == [NSNull null])) {

0 commit comments

Comments
 (0)
Failed to load comments.