Skip to content

bug: pass_host is reset to default value "pass" when editing upstream nodes #3294

@FrankLin8310

Description

@FrankLin8310

Issue description

When editing upstream nodes in APISIX Dashboard (adding, removing, or modifying nodes), the pass_host field is automatically reset to the default value "pass", instead of preserving the previously configured value (e.g., "node").

This causes serious issues when the backend is a Kubernetes Ingress or reverse proxy that relies on the Host header for routing - requests fail with 404 Not Found because the wrong Host header is sent.

Environment:

  • APISIX version: 3.2.2 LTS
  • APISIX Dashboard version: 3.0.1
  • etcd version: 3.5.7

Related Issues:

Expected behavior

When editing upstream nodes, the pass_host field should retain its previously configured value (e.g., "node"), not be reset to the default value "pass".

How to Reproduce

  1. Create an upstream via Admin API or Dashboard with:

    • Node: my-service.my-namespace.svc:80 (domain-based)
    • pass_host: "node"
  2. Verify the upstream works correctly (backend receives proper Host header)

  3. Edit the upstream in Dashboard - add or modify a node

  4. Save the upstream

  5. Check the configuration via Admin API:
    curl -s http://127.0.0.1:9180/apisix/admin/upstreams/{id} -H 'X-API-KEY: xxx'

  6. Observe that pass_host has been reset to "pass" instead of remaining "node"

Screenshots

No response

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run etcd --version):
  • apisix-dashboard version, if have:
  • Browser version, if have:

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions