Skip to content

Commit

Permalink
#25: Temporarily disable CORS proxying.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjtappe committed Dec 11, 2024
1 parent 0d28c4e commit 3a02304
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/utils/url_functions.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart';
import 'package:url_launcher/url_launcher.dart';

class UrlFunctions {
Expand All @@ -14,12 +13,12 @@ class UrlFunctions {

static String proxy(String? url) {
url ??= '';
if (kIsWeb &&
url.isNotEmpty &&
! url.startsWith('https://firebasestorage.googleapis.com')
) {
url = 'https://corsproxy.io/?${Uri.encodeFull(url)}';
}
// if (kIsWeb &&
// url.isNotEmpty &&
// ! url.startsWith('https://firebasestorage.googleapis.com')
// ) {
// url = 'https://corsproxy.io/?${Uri.encodeFull(url)}';
// }
return url;
}
}

0 comments on commit 3a02304

Please sign in to comment.