Skip to content

fix: pg:backups:download respects HTTPS_PROXY env var - #3836

Merged
heroku-johnny merged 4 commits into
mainfrom
W-23597944
Jul 28, 2026
Merged

fix: pg:backups:download respects HTTPS_PROXY env var#3836
heroku-johnny merged 4 commits into
mainfrom
W-23597944

Conversation

@heroku-johnny

Copy link
Copy Markdown
Contributor

Summary

  • pg:backups:download used bare https.get(url, callback) with no proxy agent, silently bypassing any configured corporate proxy
  • Adds proxy detection (https_proxy / HTTPS_PROXY) and wires in HttpsProxyAgent — exactly the pattern already used in src/lib/run/log-displayer.ts
  • https-proxy-agent is already a declared production dependency (^7.0.6 in package.json), so no new deps are needed
  • When no proxy env var is set, behavior is unchanged (empty options object is passed)

Fixes #1531 | W-23597944

Test plan

  • Set HTTPS_PROXY=http://your-proxy:8080 and run heroku pg:backups:download — confirm traffic routes through the proxy
  • Unset HTTPS_PROXY and confirm download still works normally
  • No unit test file exists for src/lib/pg/download.ts; a follow-up test can be added if desired

🤖 Generated with Claude Code

Route backup download requests through the proxy configured in
https_proxy / HTTPS_PROXY environment variables using the already-
declared https-proxy-agent dependency, matching the pattern used in
src/lib/run/log-displayer.ts.

Fixes #1531 (W-23597944)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@heroku-johnny
heroku-johnny requested a review from a team as a code owner July 27, 2026 19:16

@tlowrimore-heroku tlowrimore-heroku left a comment

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.

LGTM

@heroku-johnny
heroku-johnny merged commit 288f302 into main Jul 28, 2026
19 checks passed
@heroku-johnny
heroku-johnny deleted the W-23597944 branch July 28, 2026 18:51
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.

Proxy support for pg:backups:download

2 participants