High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(mobile): set custom headers on external url (#14707) (#14708)
Alex Sherwinfe554c3a5bb0
diff --git a/mobile/lib/services/auth.service.dart b/mobile/lib/services/auth.service.dartindex 0393470098..08741a15db 100644--- a/mobile/lib/services/auth.service.dart+++ b/mobile/lib/services/auth.service.dart@@ -57,13 +57,18 @@ class AuthService {Future<bool> validateAuxilaryServerUrl(String url) async {final httpclient = HttpClient();- final accessToken = _authRepository.getAccessToken();bool isValid = false;try {final uri = Uri.parse('$url/users/me');final request = await httpclient.getUrl(uri);- request.headers.add('x-immich-user-token', accessToken);++ // add auth token + any configured custom headers+ final customHeaders = ApiService.getRequestHeaders();+ customHeaders.forEach((key, value) {+ request.headers.add(key, value);+ });+final response = await request.close();if (response.statusCode == 200) {isValid = true;