File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -89,18 +89,8 @@ class Client {
8989 final Directory cookieDir = await _getCookiePath();
9090 cookieJar = new PersistCookieJar(dir:cookieDir.path);
9191 this.http.interceptors.add(CookieManager(cookieJar));
92- if(Platform.isAndroid || Platform.isIOS) {
93- PackageInfo packageInfo = await PackageInfo.fromPlatform();
94- addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
95- } else if(Platform.isLinux) {
96- addHeader('Origin', 'appwrite-linux://');
97- } else if(Platform.isMacOS) {
98- addHeader('Origin', 'appwrite-macos://');
99- } else if(Platform.isWindows) {
100- addHeader('Origin', 'appwrite-windows://');
101- } else if(Platform.isFuchsia) {
102- addHeader('Origin', 'appwrite-fuchsia://');
103- }
92+ PackageInfo packageInfo = await PackageInfo.fromPlatform();
93+ addHeader('Origin', 'appwrite-$type://${packageInfo.packageName}');
10494 }else{
10595 // if web set httpClientAdapter as BrowserHttpClientAdapter with withCredentials true to make cookies work
10696 this.http.options.extra['withCredentials'] = true;
You can’t perform that action at this time.
0 commit comments