Skip to content

Commit

Permalink
fix(ios): remove hardcoded X-Requested-With header (apache#287)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
timbru31 authored Oct 27, 2020
1 parent dcae926 commit 88e39df
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/ios/CDVFileTransfer.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ - (NSString*)escapePathComponentForUrlString:(NSString*)urlString

- (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLRequest*)req
{
[req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];

for (NSString* headerName in headers) {
id value = [headers objectForKey:headerName];
if (!value || (value == [NSNull null])) {
Expand Down

0 comments on commit 88e39df

Please sign in to comment.