Skip to content

Add flag to preserve original user agent in proxies - #3798

Merged
kieran-sf merged 13 commits into
developfrom
remove-cf-user-agent
Apr 30, 2026
Merged

Add flag to preserve original user agent in proxies#3798
kieran-sf merged 13 commits into
developfrom
remove-cf-user-agent

Conversation

@kieran-sf

@kieran-sf kieran-sf commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Keep the original user agent in proxy requests

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • Remove setting the user agent to amazon cloudfront

How to Test-Drive This PR

  • Unit tests

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@git2gus

git2gus Bot commented Apr 23, 2026

Copy link
Copy Markdown

Git2Gus App is installed but the .git2gus/config.json doesn't have right values. You should add the required configuration.

@cc-prodsec

cc-prodsec commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kieran-sf
kieran-sf marked this pull request as ready for review April 29, 2026 16:45
@kieran-sf
kieran-sf requested a review from a team as a code owner April 29, 2026 16:45
Comment thread packages/pwa-kit-dev/CHANGELOG.md Outdated
@@ -1,3 +1,6 @@
## 3.19.0 (Apr 27, 2026)
- Keep original User Agent header in proxy requests

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you reference the PR please and thank you

Comment on lines -886 to -891
// Replace some headers with hardwired values
if (workingHeaders.getHeader(USER_AGENT)) {
// Mimic the behaviour of CloudFront
workingHeaders.setHeader(USER_AGENT, 'Amazon CloudFront')
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the remote server keep the user agent? is that why we are removing this from the dev server?

is this breaking? bug?

Comment thread packages/pwa-kit-runtime/CHANGELOG.md Outdated
@@ -1,3 +1,6 @@
## 3.19.0 (Apr 27, 2026)
- Keep original User Agent header in proxy requests

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reference the PR please

bendvc
bendvc previously approved these changes Apr 29, 2026
@kieran-sf kieran-sf changed the title Remove CF user agent Add flag to preserve original user agent in proxies Apr 29, 2026
o-olaosebikan
o-olaosebikan previously approved these changes Apr 29, 2026
@o-olaosebikan
o-olaosebikan dismissed stale reviews from bendvc and themself via 6fa5647 April 30, 2026 20:28
@kieran-sf
kieran-sf enabled auto-merge (squash) April 30, 2026 22:18
@kieran-sf
kieran-sf merged commit ea384cd into develop Apr 30, 2026
41 checks passed
@kieran-sf
kieran-sf deleted the remove-cf-user-agent branch April 30, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants