Skip to content

Commit

Permalink
里站画廊封面图无法访问,暂时全部替换图片url的host为ehgt.org
Browse files Browse the repository at this point in the history
Failed to load gallery cover image for exhentai without domain-fronting. Temporarily replace the 'host' field in all cover image's url from 'exhentai.org' to 'ehgt.org'
  • Loading branch information
jiangtian616 committed Jul 25, 2022
1 parent 3087faf commit cf9d024
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/widget/eh_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ class _EHImageState extends State<EHImage> {

/// replace image host: exhentai.org -> ehgt.org
String _replaceEXUrlIfEnableDomainFronting(String url) {
if (NetworkSetting.enableDomainFronting.isFalse) {
return url;
}
// if (NetworkSetting.enableDomainFronting.isFalse) {
// return url;
// }
Uri rawUri = Uri.parse(url);
String host = rawUri.host;
if (host != 'exhentai.org') {
Expand Down

2 comments on commit cf9d024

@honjow
Copy link
Contributor

@honjow honjow commented on cf9d024 Jul 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

里站小图无法访问的话,把cookie带上就行了。。不应该换成ehgt.org

@jiangtian616
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

里站小图无法访问的话,把cookie带上就行了。。不应该换成ehgt.org

有道理哈_(:з」∠)_

Please sign in to comment.