Skip to content

Commit 66d3125

Browse files
feat: replace original Authentication header after HaProxy auth (#33)
* 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]>
1 parent 53a7e6c commit 66d3125

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

haproxy_ex_apps.cfg.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ frontend ex_apps
1919

2020
http-request auth realm AppAPI unless valid_credentials
2121

22+
# Replace the Authorization header if there is X-Original-Authorization header of the original request
23+
http-request set-header Authorization %[req.hdr(X-Original-Authorization)] if { req.hdr(X-Original-Authorization) -m found }
24+
2225
# We allow anything for ExApps
2326
http-request allow
2427
use_backend bk_ex_apps

0 commit comments

Comments
 (0)