0x1306e6d / tollgate

An API gateway for your microservice.
MIT License
6 stars 1 forks source link

Add option to disallow request or response headers #139

Closed 0x1306e6d closed 3 years ago

0x1306e6d commented 3 years ago

Add disallowRequestHeaders and disallowResponseHeaders methods to UpstreamBuilder. It allows users to make some HTTP headers not to be included in an HTTP request to upstream or response from the upstream. It'd be useful to disallow kind of sensitive headers like authorization header.

Move executing an HTTP request from UpstreamHttpService to Upstream and specific execution is hidden. We can provide more options through UpstreamBuilder.

codecov[bot] commented 3 years ago

Codecov Report

Merging #139 (1f2a346) into master (f116a27) will increase coverage by 2.97%. The diff coverage is 91.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #139      +/-   ##
============================================
+ Coverage     64.54%   67.51%   +2.97%     
- Complexity      114      127      +13     
============================================
  Files            25       25              
  Lines           392      434      +42     
  Branches         19       28       +9     
============================================
+ Hits            253      293      +40     
  Misses          116      116              
- Partials         23       25       +2     
Impacted Files Coverage Δ
...ain/java/dev/gihwan/tollgate/gateway/Upstream.java 20.00% <ø> (ø)
...a/dev/gihwan/tollgate/gateway/UpstreamBuilder.java 50.00% <86.66%> (+27.77%) :arrow_up:
...ollgate/hocon/DefaultHoconGatewayConfigurator.java 64.63% <86.95%> (+4.36%) :arrow_up:
...a/dev/gihwan/tollgate/gateway/DefaultUpstream.java 100.00% <100.00%> (ø)
...v/gihwan/tollgate/gateway/UpstreamHttpService.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f116a27...1f2a346. Read the comment docs.