fix: correction accès backendia avec yunohost
Build & Release Android APK / build-apk (push) Failing after 2m1s

This commit is contained in:
streaper2
2026-08-26 22:10:03 +02:00
parent c0177b19e3
commit e889456bfa
4 changed files with 84 additions and 2 deletions
+7 -1
View File
@@ -47,6 +47,9 @@ class WalletIdentityService {
/// URL par défaut du serveur de production
static const String defaultServerUrl = 'https://backendia.kevlar.cloud';
/// Clé d'authentification API secrète pour le backend
static const String apiKey = 'bully_secret_api_key_2026_x89';
/// Retourne l'URL de base du serveur configuré (par défaut: https://backendia.kevlar.cloud)
Future<String> getServerBaseUrl() async {
final prefs = await SharedPreferences.getInstance();
@@ -115,7 +118,10 @@ class WalletIdentityService {
final walletHash = sha256.convert(phraseBytes).toString();
final baseUrl = await getServerBaseUrl();
final res = await http.get(Uri.parse('$baseUrl/api/stats/$walletHash')).timeout(
final res = await http.get(
Uri.parse('$baseUrl/api/stats/$walletHash'),
headers: {'X-API-KEY': apiKey},
).timeout(
const Duration(seconds: 4),
);
if (res.statusCode == 200) {