Skip to content

[Backport 21.2.x] fix(http): preserve empty referrer option in HttpRequest#69193

Open
SkyZeroZx wants to merge 1 commit into
angular:21.2.xfrom
SkyZeroZx:backporting-69171-21.2.x
Open

[Backport 21.2.x] fix(http): preserve empty referrer option in HttpRequest#69193
SkyZeroZx wants to merge 1 commit into
angular:21.2.xfrom
SkyZeroZx:backporting-69171-21.2.x

Conversation

@SkyZeroZx
Copy link
Copy Markdown
Contributor

Backport of #69171

Preserve `referrer: ''` when constructing and cloning HttpRequest.

An empty string is a valid Fetch referrer value and is documented by
Angular as the way to omit referrer information for sensitive requests.
The previous truthy checks treated it as if the option was not provided,
causing requests to fall back to the browser default referrer behavior.

(cherry picked from commit 1e54b8f)
@SkyZeroZx SkyZeroZx closed this Jun 5, 2026
@pullapprove pullapprove Bot requested a review from kirjs June 5, 2026 14:52
@angular-robot angular-robot Bot added the area: common/http Issues related to HTTP and HTTP Client label Jun 5, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 5, 2026
@SkyZeroZx SkyZeroZx reopened this Jun 5, 2026
@SkyZeroZx SkyZeroZx changed the title [Backport of 21.3.x] fix(http): preserve empty referrer option in HttpRequest [Backport of 21.2.x] fix(http): preserve empty referrer option in HttpRequest Jun 5, 2026
@SkyZeroZx SkyZeroZx changed the title [Backport of 21.2.x] fix(http): preserve empty referrer option in HttpRequest [Backport 21.2.x] fix(http): preserve empty referrer option in HttpRequest Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: common/http Issues related to HTTP and HTTP Client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant