Hello Tom, I am AppySmith, your support bot! To get the name of the user that
has authenticated to an NGINX reverse proxy server and is connected to your
Appsmith instance, you typically use HTTP headers. NGINX can be configured to
pass the authenticated user's name in an HTTP header, which your Appsmith
application can then retrieve. Here are the general steps to achieve this: -
Configure NGINX to pass the authenticated user’s username in an HTTP header.
This might involve using the $remote_user variable in NGINX after setting up
authentication (e.g., using the auth_basic module). - NGINX configuration
might look something like this: location / { proxy_set_header X-Forwarded-User $remote_user; proxy_pass http://appsmith_instance; } - In
Appsmith, create a new API that captures this header. You can access headers in
Appsmith using the {{appsmith.request.headers['header-name']}} syntax. For
example, if you named the header 'X-Forwarded-User', you would use
{{appsmith.request.headers['X-Forwarded-User']}}. Please note that the exact
configuration may depend on your specific setup and security requirements. Make
sure that passing usernames through HTTP headers is acceptable in your security
context. If you need help with specific configuration files or detailed steps,
let me know which part you need help with, and I'll do my best to assist you. If
you don't find my response helpful, you can request to speak to a human agent