diff options
Diffstat (limited to 'platform/darwin/http_request_nsurl.mm')
-rw-r--r-- | platform/darwin/http_request_nsurl.mm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/platform/darwin/http_request_nsurl.mm b/platform/darwin/http_request_nsurl.mm index 5ab4e1b43e..85d5bffb09 100644 --- a/platform/darwin/http_request_nsurl.mm +++ b/platform/darwin/http_request_nsurl.mm @@ -154,13 +154,15 @@ void HTTPRequest::start() { @autoreleasepool { NSMutableString *url = [NSMutableString stringWithString:@(resource.url.c_str())]; - if ([[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0) { - if ([url rangeOfString:@"?"].location == NSNotFound) { - [url appendString:@"?"]; - } else { - [url appendString:@"&"]; + if ([url rangeOfString:@"mapbox.com"].location != NSNotFound) { + if ([[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0) { + if ([url rangeOfString:@"?"].location == NSNotFound) { + [url appendString:@"?"]; + } else { + [url appendString:@"&"]; + } + [url appendString:@"events=true"]; } - [url appendString:@"events=true"]; } NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]]; |