This commit is contained in:
Tibor Bossanyi
2023-03-29 15:27:51 +02:00
parent 953753196b
commit 9311a888bc
5 changed files with 23 additions and 26 deletions
-9
View File
@@ -27,7 +27,6 @@ class APIWebClient with Common, Logging {
final body = jsonEncode(<String, String>{'username': email, 'password': password});
var uri = Uri.parse(url);
var result = await http.post(uri, body: body, headers: {
"Access-Control-Allow-Origin": 'https://*.diet4you.eu, https://*.diet4you.hu, http://localhost',
"Content-Type": "application/json",
"Authorization": "1",
});
@@ -65,10 +64,6 @@ class APIWebClient with Common, Logging {
}
var uri = Uri.parse(url);
var result = await http.post(uri, body: body, headers: {
"Access-Control-Allow-Origin": 'https://*.diet4you.eu, https://*.diet4you.hu, http://localhost',
"Access-Control-Allow-Headers": "Origin,Content-Type,Authorization,locale",
"Access-Control-Allow-Credentials": 'true', // Required for cookies, authorization headers with HTTPS
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Content-Type": "application/json",
"Authorization": 'Bearer $authToken',
});
@@ -102,10 +97,6 @@ class APIWebClient with Common, Logging {
var uri = Uri.parse(url);
var result = await http.get(uri, headers: {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": 'https://*.diet4you.eu, https://*.diet4you.hu, http://localhost',
"Access-Control-Allow-Headers": "Origin,Content-Type,Authorization,locale",
"Access-Control-Allow-Credentials": 'true', // Required for cookies, authorization headers with HTTPS
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Authorization": 'Bearer $authToken',
});