Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: More convenient Host header forwarding in proxy mode #2265

Merged
merged 9 commits into from
Mar 5, 2025

Conversation

dadrus
Copy link
Owner

@dadrus dadrus commented Mar 4, 2025

Related issue(s)

closes #2264

Checklist

  • I agree to follow this project's Code of Conduct.
  • I have read, and I am following this repository's Contributing Guidelines.
  • I have read the Security Policy.
  • I have referenced an issue describing the bug/feature request.
  • I have added tests that prove the correctness of my implementation.
  • I have updated the documentation.

Description

As proposed in the referenced FR, this PR adds a new boolean property, forward_host_header, to the forward_to settings. This property allows you to specify whether the client Host header should be forwarded to the upstream service. The default value is true.

You can still configure a custom Host header value using a header finalizer, which will take precedence over the forward_host_header setting.

@dadrus dadrus changed the title Feat/forward host in proxy mode feat: More convenient Host header forwarding in proxy mode Mar 4, 2025
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.55%. Comparing base (0413eb9) to head (16a3767).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2265      +/-   ##
==========================================
+ Coverage   90.54%   90.55%   +0.01%     
==========================================
  Files         279      279              
  Lines       12280    12298      +18     
==========================================
+ Hits        11119    11137      +18     
  Misses        916      916              
  Partials      245      245              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dadrus dadrus merged commit c3ece0f into main Mar 5, 2025
28 checks passed
@dadrus dadrus deleted the feat/forward_host_in_proxy_mode branch March 5, 2025 17:56
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.

Make Host header forwarding in proxy mode more convenient
1 participant