Skip to content

Support custom request headers for remote images, especially Referer #369

@wekor

Description

@wekor

Is your feature request related to a problem? Please describe.
Some Markdown image URLs are protected by CDN / hotlink protection rules and require a Referer HTTP header to load successfully.

Currently EnrichedMarkdownText downloads remote images internally, so app code cannot pass request headers for those image requests. This makes images fail to render even though the same URL works when requested with the correct Referer.

Describe the solution you'd like
Please add an API for passing headers to remote image requests, for example:

<EnrichedMarkdownText
  markdown={markdown}
  imageRequestHeaders={{
    Referer: 'https://example.com',
  }}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions