Shopify / Shopify/cli

Support SHOPIFY_HTTP(S)_PROXY usage in theme commands

Open
#5,890 19 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area: @shopify/cli Area: @shopify/cli-kit Area: @shopify/theme Type: Bug
Dominant language
TypeScript
Stars
750
Forks
293
Avg merge
3d 20h
Merged PRs (30d)
79

Description

Please confirm that you have:
  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?

Theme

Expected behavior

The CLI should successfully render the storefront through the configured HTTP proxy.

Actual behavior

The CLI fails to render the storefront with a 502 Bad Gateway error, despite proper proxy configuration.

Verbose output
Verbose output
Failed to render storefront with status 502 (Bad Gateway).
URL: [REDACTED]

TypeError: fetch failed
  at node:internal/deps/undici/undici:13510:13
  at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
  at async render2 [...]
  at async Object.handler [...]
  at async Server.<anonymous> [...]
Reproduction steps

1.Set HTTP proxy environment variables:

$env:SHOPIFY_HTTP_PROXY = "http://127.0.0.1:PORT"
$env:SHOPIFY_HTTPS_PROXY = "http://127.0.0.1:PORT"
2.Run shopify theme dev -e development
3.CLI starts successfully and provides preview URLs
4.Immediately encounters 502 Bad Gateway error

### Operating System

Windows 11

### Shopify CLI version (`shopify --version`)

@shopify/cli/0.0.0-snapshot-20250313171017

### Shell

powershell

### Node version (run `node -v` if you're not sure)

v22.15.1

### What language and version are you using in your application?

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shopify theme dev -e development command and its storefront rendering path, tracing how SHOPIFY_HTTP_PROXY and SHOPIFY_HTTPS_PROXY are handled. Reproduce on Windows with the provided environment variables and confirm that the storefront renders successfully instead of returning a 502 Bad Gateway error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, powershell, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.