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: Reverse proxy support #90

Merged
merged 80 commits into from
Jul 26, 2022
Merged

feat: Reverse proxy support #90

merged 80 commits into from
Jul 26, 2022

Conversation

dadrus
Copy link
Owner

@dadrus dadrus commented Jul 19, 2022

closes #4
closes #96

TODOs:

  • implement the actual proxy handler
  • refactor health and jwks endpoints to be served by a "management" port. Otherwise requests, which have the same path cannot be proxied and will be served by heimdall directly
  • Docs: Update Quickstart-Guide to include Proxy usage, Docs: Update Config Description, ...
  • Tests, Tests, Tests
  • Implement "tracing middleware" for proxied requests
  • Update the X-Forwarded-For header only if it is present. Otherwise use the Forwarded header, which superseded the X-Forwarded-For header
  • Delete the X-Forwarded-Method, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Uri and X-Forwarded-Path from the request forwarded to the upstream service. These header are useless for it as these contain the URL parts, heimdall is using to connect.

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #90 (b950d86) into main (1738623) will increase coverage by 0.46%.
The diff coverage is 81.13%.

@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   85.02%   85.48%   +0.46%     
==========================================
  Files         141      146       +5     
  Lines        5221     5449     +228     
==========================================
+ Hits         4439     4658     +219     
- Misses        667      672       +5     
- Partials      115      119       +4     
Impacted Files Coverage Δ
cmd/health.go 17.77% <0.00%> (ø)
internal/config/configuration.go 100.00% <ø> (ø)
internal/config/serve.go 0.00% <ø> (ø)
internal/fiber/middleware/xfmphu/handler.go 100.00% <ø> (ø)
internal/handler/management/jwks.go 100.00% <ø> (ø)
internal/handler/prometheus/module.go 0.00% <0.00%> (ø)
internal/heimdall/errors.go 100.00% <ø> (ø)
internal/x/compare.go 100.00% <ø> (ø)
internal/handler/proxy/module.go 42.37% <31.42%> (+42.37%) ⬆️
internal/handler/management/module.go 41.37% <41.37%> (ø)
... and 24 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

dadrus added 19 commits July 19, 2022 23:12
…implement requirements of the decision api and the proxy handler
…rusted proxies was unfortunately impossible.
@dadrus dadrus changed the title wip: Reverse proxy support feat: Reverse proxy support Jul 26, 2022
@dadrus dadrus merged commit 0436a52 into main Jul 26, 2022
@dadrus dadrus deleted the reverse_proxy_support branch July 26, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant