Skip to content

Incorrect Default Referer Header Causes 403 Errors for CDN Images #1199

@hualiong

Description

@hualiong

Checklist

  • I've already searched in existing issues and haven't found a similar problem reported.
  • I'm using the latest version of the app
  • This error caused the app to crash
  • This error is reproducible

Which category best fits this error?

Feed Sync

App version

0.15.3

Bug description

The application incorrectly sets the Referer header for image requests. By default, it uses the image's hostname as the Referer. This behavior breaks image loading for many sites that use CDNs with strict Referer policies, resulting in HTTP 403 Forbidden errors.

The main code where the bug occurred during the construction of the ImageRequest in RYAsyncImage.kt and Image.kt.

Reproduction steps

  1. Subscribe to this RSS feed: https://www.yystv.cn/rss/feed
  2. Browse any article casually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguntriagedThis issue hasn't been triaged yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions