-
Notifications
You must be signed in to change notification settings - Fork 31
fix: Add User-Agent header to fix CDN blockage #155
fix: Add User-Agent header to fix CDN blockage #155
Conversation
Note: |
"source.fixAll": "explicit", | ||
"source.organizeImports": "explicit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headers: {'User-Agent': 'Boorusphere/1.4.3'}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some packages were updated automatically
file_picker: ^5.2.3 | ||
flutter_cache_manager: ^3.0.0-nullsafety.1 | ||
flutter_displaymode: ^0.6.0 | ||
flutter_downloader: ^1.9.0 | ||
flutter_downloader: ^1.10.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumped this requirement because app build was getting crazy. Perhaps it's not required.
But I got an error saying that Enumerator was somehow invalid.
@@ -81,6 +80,7 @@ dependencies: | |||
wakelock: ^0.6.2 | |||
xml2json: ^6.0.0 | |||
yaml: ^3.1.0 | |||
extended_image: ^8.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, I've got build errors for no fault of mine, reinstalling this dependency resolved the issue.
Thank you so much 😭 |
This pull request addresses the issue #150, by replacing a default User-Agent header from
FlutterDownloader
to a custom one.This effect can also be achieved, as described in #150, by simply removing this header altogether, however I have not tried to do this.
I can provide a screenshot of the app interface with working downloads, as well as console output:
Feel free to change the user agent, discard other alterations, or just ditch this change in favor of some other edit.