Skip to content

fix(airbrake): upgrade http-proxy-middleware to v3 - #10297

Open
Adesanmi1 wants to merge 2 commits into
backstage:mainfrom
Adesanmi1:fix/airbrake-http-proxy-middleware-v3
Open

fix(airbrake): upgrade http-proxy-middleware to v3#10297
Adesanmi1 wants to merge 2 commits into
backstage:mainfrom
Adesanmi1:fix/airbrake-http-proxy-middleware-v3

Conversation

@Adesanmi1

Copy link
Copy Markdown

Hey, I just made a Pull Request!

Upgrades http-proxy-middleware from ^2.0.0 to ^3.0.0 in the airbrake-backend plugin, resolving #629.

Context

A previous Renovate PR (#406) attempting this same upgrade was closed without merging, since it was suspected to break due to the "pathRewrite (potential behavior change)" note in http-proxy-middleware's v3 migration guide (v3 removes automatic req.url patching, so pathRewrite may see the path already stripped of its mount prefix): https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION_V3.md#pathrewrite-potential-behavior-change

Looking at this plugin's generateAirbrakePathRewrite function, it strips any leading path only up through the first /api segment using a regex, and otherwise leaves the path untouched. This makes it a no-op passthrough when the mount prefix has already been stripped, so it continues to behave correctly whether or not req.url still contains that prefix. This repo's report-portal-backend plugin already uses http-proxy-middleware@^3.0.0 successfully with a similar proxy setup, which supports this.

No source code changes were needed, only the dependency bump and an accompanying changeset.

Checklist

  • A changeset describing the change and affected packages
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message.

Closes #629

Bump http-proxy-middleware from ^2.0.0 to ^3.0.0 in the airbrake-backend plugin to resolve backstage#629. The plugin's custom pathRewrite already handles the v3 "removed req.url patching" behavior change since it defensively strips any leading path only up to the first "/api" segment and is a no-op otherwise.

Signed-off-by: Adesanmi Aderibigbe <60453087+Adesanmi1@users.noreply.github.com>
Signed-off-by: Adesanmi Aderibigbe <60453087+Adesanmi1@users.noreply.github.com>
@Adesanmi1
Adesanmi1 requested a review from a team as a code owner August 11, 2026 19:08
@Adesanmi1
Adesanmi1 requested a review from hopehadfield August 11, 2026 19:08
@backstage-goalie

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-airbrake-backend workspaces/airbrake/plugins/airbrake-backend patch v0.24.0

@hopehadfield

hopehadfield commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Hey @Adesanmi1 it looks like the CI is failing on this PR. Can you try running yarn install in the workspace and committing the changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 airbrake: http-proxy-middleware v3 migration

3 participants