nginx-gateway-fabric icon indicating copy to clipboard operation
nginx-gateway-fabric copied to clipboard

Support mixed externalname and local services in single route

Open ciarams87 opened this issue 3 weeks ago • 1 comments
trafficstars

Proposed changes

Problem: When routing to an ExternalName service alongside internal services in the same HTTPRoute, NGF incorrectly sets the Host header to the Gateway's hostname instead of the external service's hostname, causing requests to fail.

Solution: Properly set Host header based on ExternalName service hostname.

Testing: Local testing using the updated examples and unit testing

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide specific feedback, add them here.

Closes #4187

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • [ ] I have read the CONTRIBUTING doc
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have checked that all unit tests pass after adding my changes
  • [ ] I have updated necessary documentation
  • [ ] I have rebased my branch onto main
  • [ ] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes, please add a brief note that summarizes the change.

Support mixed externalname and local services in single route.

ciarams87 avatar Oct 29 '25 13:10 ciarams87