Skip to content

Backport of NET-6821 Disable Terminating Gateway Auto Host Header Rewrite into release/1.18.x#20834

Merged
sarahalsmiller merged 7 commits intorelease/1.18.xfrom
backport/NET-6821-Host-Header-Rewrite/evenly-lucky-donkey
Apr 26, 2024
Merged

Backport of NET-6821 Disable Terminating Gateway Auto Host Header Rewrite into release/1.18.x#20834
sarahalsmiller merged 7 commits intorelease/1.18.xfrom
backport/NET-6821-Host-Header-Rewrite/evenly-lucky-donkey

Conversation

@hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #20802 to be assessed for backporting due to the inclusion of the label backport/1.18.

The below text is copied from the body of the original PR.


Description

  • Exposing configuration to allow users of the terminating gateway to turn off host header rewrites at the service level

Testing & Reproduction steps

  • build local consul
  • apply the following terminating gateway
Kind = "terminating-gateway"
Name = "test-gateway"
Services = [
 {
   Name = "default-behavior"
 },
 {
   Name = "default-behavior"
   DisableAutoHostRewrite = true
 }
]

Observe the generated XDS and note that the default behavior is to auto host rewrite, but not when DisableAutoHostRewrite is set to true.

Links

PR Checklist

  • [ X ] updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/NET-6821-Host-Header-Rewrite/evenly-lucky-donkey branch from e451412 to 98aef5d Compare March 12, 2024 20:37
@github-actions github-actions bot added type/docs Documentation needs to be created/updated/clarified theme/api Relating to the HTTP API interface theme/envoy/xds Related to Envoy support labels Mar 12, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved Consul Bot automated PR

name: 'DisableAutoHostRewrite',
type: 'bool: ""',
description:
'When set to true, Terminating Gateway will not modify the incoming requests host header for this service.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'When set to true, Terminating Gateway will not modify the incoming requests host header for this service.',
'When set to true, Terminating Gateway will not modify the incoming requests host header for this service. Available in Consul v1.18.1 or later.',

@david-yu
Copy link
Contributor

@sarahalsmiller Looks like this still is outstanding as a backport for 1.18.x

@sarahalsmiller sarahalsmiller merged commit e0d46f7 into release/1.18.x Apr 26, 2024
@sarahalsmiller sarahalsmiller deleted the backport/NET-6821-Host-Header-Rewrite/evenly-lucky-donkey branch April 26, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme/api Relating to the HTTP API interface theme/envoy/xds Related to Envoy support type/docs Documentation needs to be created/updated/clarified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants