hendrikmaus / openhab-auth-router

A quick solution to control sitemap access by authenticated users for openHAB home automation
5 stars 2 forks source link

implement rules in the reverse proxy director function #14

Closed hendrikmaus closed 3 years ago

hendrikmaus commented 4 years ago

This changeset removes the code smell of using goto syntax in the main part of the application. Instead, all the rule evaluation has been refactored into the director function of the reverse proxy, which can be used to manipulate requests before they are processed by the proxy.

I am also hoping to see an improvement of the linear memory consumption. Local testing with pprof showed an improvement, however a load test in prod will reveal a better understanding.

codecov[bot] commented 4 years ago

Codecov Report

Merging #14 into master will decrease coverage by 6.82%. The diff coverage is 55.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   55.68%   48.86%   -6.83%     
==========================================
  Files           2        2              
  Lines         167      176       +9     
==========================================
- Hits           93       86       -7     
- Misses         73       87      +14     
- Partials        1        3       +2     
Impacted Files Coverage Δ
main.go 46.10% <55.20%> (-7.06%) :arrow_down:

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 9ca0fde...891068d. Read the comment docs.