Skip to content

Commit

Permalink
feat: replace original Authentication header after HaProxy auth (#33)
Browse files Browse the repository at this point in the history
* feat: replace original authentication header after HaProxy auth

Signed-off-by: Andrey Borysenko <[email protected]>

* reverted changes for haproxy.cfg.template

Signed-off-by: Alexander Piskun <[email protected]>

* renamed header from `X-Original-Authentication` to `X-Original-Authorization`

Signed-off-by: Alexander Piskun <[email protected]>

---------

Signed-off-by: Andrey Borysenko <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Co-authored-by: Alexander Piskun <[email protected]>
  • Loading branch information
andrey18106 and bigcat88 authored Jul 23, 2024
1 parent 53a7e6c commit 66d3125
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions haproxy_ex_apps.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ frontend ex_apps

http-request auth realm AppAPI unless valid_credentials

# Replace the Authorization header if there is X-Original-Authorization header of the original request
http-request set-header Authorization %[req.hdr(X-Original-Authorization)] if { req.hdr(X-Original-Authorization) -m found }

# We allow anything for ExApps
http-request allow
use_backend bk_ex_apps
Expand Down

0 comments on commit 66d3125

Please sign in to comment.