Skip to content

Commit ef942a7

Browse files
committed
Update X User Agent to Contentstack SDK from Application Name
1 parent a6e7266 commit ef942a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ContentstackInternal/CSIOCoreHTTPNetworking.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ - (NSURLSessionConfiguration* )configuration {
176176
NSString *version = sdkVersion;
177177
configuration.HTTPAdditionalHeaders = @{
178178
@"User-Agent": userAgent,
179-
@"X-User-Agent": [NSString stringWithFormat:@"%@/%@",userAgent,version]
179+
@"X-User-Agent": [NSString stringWithFormat:@"contentstack-ios/%@",version]
180180
};
181181

182182
}
@@ -302,7 +302,7 @@ - (NSMutableURLRequest *)urlRequestForStack:(Stack*)stack
302302

303303
NSString *userAgent = [self userAgent];
304304
NSString *version = sdkVersion;
305-
[request setValue:[NSString stringWithFormat:@"%@/%@",userAgent,version] forHTTPHeaderField:@"X-User-Agent"];
305+
[request setValue:[NSString stringWithFormat:@"contentstack-ios/%@",version] forHTTPHeaderField:@"X-User-Agent"];
306306
[request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
307307

308308
return request;

0 commit comments

Comments
 (0)