mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-02-02 00:00:05 +08:00
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
This commit is contained in:
@@ -102,8 +102,6 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
|
||||
|
||||
- (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])) {
|
||||
|
||||
Reference in New Issue
Block a user