Prechádzať zdrojové kódy

Align - Remove Authorization for subscribing/unsubscribing Push Notification Server Proxy (2.23.8)

marinofaggiana 5 rokov pred
rodič
commit
5a7835c643

+ 2 - 2
iOSClient/Library/OCCommunicationLib/OCCommunication.m

@@ -1895,7 +1895,7 @@
     serverPath = [serverPath stringByAppendingString:@"/devices"];
     
     OCWebDAVClient *request = [OCWebDAVClient new];
-    request = [self getRequestWithCredentials:request];
+    [request.defaultHeaders setObject:self.userAgent forKey:@"User-Agent"];
     
     [request subscribingPushProxy:serverPath pushToken:pushToken deviceIdentifier:deviceIdentifier deviceIdentifierSignature:deviceIdentifierSignature publicKey:publicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
         
@@ -1916,7 +1916,7 @@
     serverPath = [serverPath stringByAppendingString:@"/devices"];
     
     OCWebDAVClient *request = [OCWebDAVClient new];
-    request = [self getRequestWithCredentials:request];
+    [request.defaultHeaders setObject:self.userAgent forKey:@"User-Agent"];
     
     [request unsubscribingPushProxy:serverPath deviceIdentifier:deviceIdentifier deviceIdentifierSignature:deviceIdentifierSignature publicKey:publicKey onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *response, id responseObject) {
         

+ 3 - 3
iOSClient/Networking/OCNetworking.m

@@ -2023,8 +2023,8 @@
     NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
     
 #ifdef DEBUG
-    proxyServerPath = @"http://127.0.0.1:8088";
-    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+//    proxyServerPath = @"http://127.0.0.1:8088";
+//    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
 #endif
     
     OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
@@ -2104,7 +2104,7 @@
     NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
     
 #ifdef DEBUG
-    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+//    proxyServer = @"https://10.132.0.37:8443/pushnotifications";
 #endif
     
     OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;