From 3c212320e53bc37d8a5445578be9bd6d22b5eee1 Mon Sep 17 00:00:00 2001 From: Tibor Bossanyi Date: Tue, 28 Mar 2023 14:22:42 +0200 Subject: [PATCH] v1.0.21 --- README.md | 4 ++++ lib/service/webapi.dart | 6 ++++-- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ffceeae..f0fe077 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ Workout Test and Diet 4 You Common Util Functions +### Version 1.0.21 + +webapi CORS: test all domains + ### Version 1.0.20 webapi CORS diff --git a/lib/service/webapi.dart b/lib/service/webapi.dart index 6c9d8dd..6489802 100644 --- a/lib/service/webapi.dart +++ b/lib/service/webapi.dart @@ -65,7 +65,8 @@ 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', + //"Access-Control-Allow-Origin": 'https://*.diet4you.eu, https://*.diet4you.hu', + "Access-Control-Allow-Origin": '*', "Content-Type": "application/json", "Authorization": 'Bearer $authToken', }); @@ -99,7 +100,8 @@ 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', + //"Access-Control-Allow-Origin": 'https://*.diet4you.eu, https://*.diet4you.hu', + "Access-Control-Allow-Origin": '*', "Authorization": 'Bearer $authToken', }); diff --git a/pubspec.yaml b/pubspec.yaml index 378fe83..95b70ba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: workouttest_util description: Workout Test app and web functions. -version: 1.0.20 +version: 1.0.21 environment: sdk: ">=2.18.6 <3.0.0"