echo
echo copied to clipboard
middleware: basic auth middleware can extract and check multiple auth…
basic auth middleware can extract and check multiple auth headers.
This is taken from v5. Because of #2461 to get better tests in v4 for that middleware. Multiple auth headers is rare case. You probably can see this in test environments where application uses JWT token (which is also auth header) but for TEST env Nginx/Apache2 etc is configured to have basic auth for all requests. In that case your web-browser actually will send 2 auth header and it is 50/50 change that your request will pass as when previous version gets the header from Headers map you have 50/50 chance not to get JWT header.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
c7d6d43) 92.89% compared to head (6269cab) 93.08%.
Additional details and impacted files
@@ Coverage Diff @@
## master #2539 +/- ##
==========================================
+ Coverage 92.89% 93.08% +0.19%
==========================================
Files 39 39
Lines 4658 4659 +1
==========================================
+ Hits 4327 4337 +10
+ Misses 240 235 -5
+ Partials 91 87 -4
| Files | Coverage Δ | |
|---|---|---|
| middleware/basic_auth.go | 95.74% <100.00%> (+19.65%) |
:arrow_up: |
| middleware/middleware.go | 94.33% <ø> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.