Remove proxy code

This commit is contained in:
Shawn 2023-10-03 14:16:01 -06:00
parent c4e34edfd2
commit 79631cd91d

View File

@ -28,14 +28,6 @@ class AppImage extends StatefulWidget {
final Color? color;
final double? scale;
static String maybeAddImgProxy(String url) {
String proxyUrl = 'proxy.wonderous.app:8081/';
if (!url.contains(proxyUrl) && (url.contains('images.metmuseum.org') || url.contains('img.youtube.com'))) {
url = 'https://$proxyUrl$url';
}
return url;
}
@override
State<AppImage> createState() => _AppImageState();
}
@ -59,15 +51,9 @@ class _AppImageState extends State<AppImage> {
void _updateImage() {
if (widget.image == _sourceImage) return;
_sourceImage = widget.image;
/// Apply proxy to MET api images
if(kIsWeb && _sourceImage is NetworkImage){
final url = (_sourceImage as NetworkImage).url;
_sourceImage = NetworkImage(AppImage.maybeAddImgProxy(url));
}
_displayImage = _capImageSize(_addRetry(_sourceImage));
}
@override
Widget build(BuildContext context) {
return ImageFade(