π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use nanoID for request id
Neeraj Gupta69eef7043f54
diff --git a/mobile/lib/core/network/ente_interceptor.dart b/mobile/lib/core/network/ente_interceptor.dartindex 676fe94cb3..1ca14ff0b6 100644--- a/mobile/lib/core/network/ente_interceptor.dart+++ b/mobile/lib/core/network/ente_interceptor.dart@@ -1,10 +1,13 @@+import "dart:io";+import 'package:dio/dio.dart';import 'package:flutter/foundation.dart';import 'package:photos/core/configuration.dart';-import 'package:uuid/uuid.dart';+import "package:photos/models/base/id.dart";class EnteRequestInterceptor extends Interceptor {final String enteEndpoint;+ final String id = Platform.isIOS ? "ios" : "droid";EnteRequestInterceptor(this.enteEndpoint);@@ -17,7 +20,7 @@ class EnteRequestInterceptor extends Interceptor {);}// ignore: prefer_const_constructors- options.headers.putIfAbsent("x-request-id", () => Uuid().v4().toString());+ options.headers.putIfAbsent("x-request-id", () => newID(id));final String? tokenValue = Configuration.instance.getToken();if (tokenValue != null) {options.headers.putIfAbsent("X-Auth-Token", () => tokenValue);