Преглед на файлове

Merge pull request #1312 from vkrause/work/vkrause/detect-encrypted-messages-as-unified-push

Consider aes128gcm content encoding as an indicator for UnifiedPush
Philipp C. Heckel преди 9 месеца
родител
ревизия
bd4b5e9e1b
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      server/server.go

+ 2 - 1
server/server.go

@@ -1025,7 +1025,8 @@ func (s *Server) parsePublishParams(r *http.Request, m *message) (cache bool, fi
 	}
 	}
 	template = readBoolParam(r, false, "x-template", "template", "tpl")
 	template = readBoolParam(r, false, "x-template", "template", "tpl")
 	unifiedpush = readBoolParam(r, false, "x-unifiedpush", "unifiedpush", "up") // see GET too!
 	unifiedpush = readBoolParam(r, false, "x-unifiedpush", "unifiedpush", "up") // see GET too!
-	if unifiedpush {
+	contentEncoding := readParam(r, "content-encoding")
+	if unifiedpush || contentEncoding == "aes128gcm" {
 		firebase = false
 		firebase = false
 		unifiedpush = true
 		unifiedpush = true
 	}
 	}