Closed rshah2019 closed 3 years ago
so my ngnix configuration has following. How can I forward authenticated user name to my backend service ? My backend service would like to fetch this user name and use it to do something given each request.
location /api/endpoint/ { proxy_pass http://www.example-service.com:5000 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
Hi, did you try?
proxy_pass_header Authorization;
or
proxy_set_header X-User $remote_user;
so my ngnix configuration has following. How can I forward authenticated user name to my backend service ? My backend service would like to fetch this user name and use it to do something given each request.