Skip to content

Conversation

SkyZeroZx
Copy link
Contributor

Currently, Angular's httpResource does not expose the referrer and integrity options from the underlying Fetch API.

Exposing these options would provide developers with finer control over the request's referrer and subresource integrity validation, which are important for ensuring security, privacy, and trust in critical resource fetching scenarios.

New Usage Example

httpResource(() => ({
  url: '${CDN_DOMAIN}/assets/data.json',
  method: 'GET',
  referrer: 'no-referrer',
  integrity: 'sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GhEXAMPLEKEY='
}));

@pullapprove pullapprove bot requested a review from AndrewKushnir July 4, 2025 03:13
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: common/http Issues related to HTTP and HTTP Client labels Jul 4, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 4, 2025
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

LGTM!

reviewed-for: fw-general, public-api

@pullapprove pullapprove bot requested review from devversion and mmalerba July 4, 2025 07:07
@devversion devversion removed their request for review July 4, 2025 11:33
@pullapprove pullapprove bot requested a review from crisbeto July 4, 2025 11:33
@thePunderWoman thePunderWoman added the target: minor This PR is targeted for the next minor release label Jul 7, 2025
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@thePunderWoman thePunderWoman force-pushed the add-referrer-integrity-httpResource branch from 528fa79 to 478f91a Compare July 11, 2025 16:43
@thePunderWoman thePunderWoman added the action: merge The PR is ready for merge by the caretaker label Jul 11, 2025
…tpResource

This commit adds support for the Fetch API's referrer & integrity options when using httpResource with the withFetch provider
@thePunderWoman thePunderWoman force-pushed the add-referrer-integrity-httpResource branch from 478f91a to 1fb5a3a Compare July 11, 2025 16:48
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit be811fe.

The changes were merged into the following branches: main

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common/http Issues related to HTTP and HTTP Client detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants