@@ -110,7 +110,8 @@ class AuthProvider with ChangeNotifier {
110
110
makeUri (serverUrl, REGISTRATION_URL ),
111
111
headers: {
112
112
HttpHeaders .contentTypeHeader: 'application/json; charset=UTF-8' ,
113
- HttpHeaders .authorizationHeader: 'Token ${metadata ![MANIFEST_KEY_API ]}'
113
+ HttpHeaders .authorizationHeader: 'Token ${metadata ![MANIFEST_KEY_API ]}' ,
114
+ HttpHeaders .userAgentHeader: getAppNameHeader (),
114
115
},
115
116
body: json.encode (data),
116
117
);
@@ -135,6 +136,7 @@ class AuthProvider with ChangeNotifier {
135
136
makeUri (serverUrl, LOGIN_URL ),
136
137
headers: < String , String > {
137
138
HttpHeaders .contentTypeHeader: 'application/json; charset=UTF-8' ,
139
+ HttpHeaders .userAgentHeader: getAppNameHeader (),
138
140
},
139
141
body: json.encode ({'username' : username, 'password' : password}),
140
142
);
@@ -219,10 +221,10 @@ class AuthProvider with ChangeNotifier {
219
221
String getAppNameHeader () {
220
222
String out = '' ;
221
223
if (applicationVersion != null ) {
222
- out = '${applicationVersion !.version } '
224
+ out = '/ ${applicationVersion !.version } '
223
225
'(${applicationVersion !.packageName }; '
224
226
'build: ${applicationVersion !.buildNumber })' ;
225
227
}
226
- return 'wger App/ $out ' ;
228
+ return 'wger App$out ' ;
227
229
}
228
230
}
0 commit comments