[GH-ISSUE #2314] [BUG]: Basic Auth behind a reverse proxy is broken #1512

Closed
opened 2026-02-22 18:25:12 -05:00 by yindo · 3 comments
Owner

Originally created by @Danoloan10 on GitHub (Sep 18, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2314

How are you running AnythingLLM?

Docker (remote machine)

What happened?

When deploying A-LLM behind a reverse proxy and configuring Básica Auth in the proxy, the app keeps rewriting the Authorization header to null, thus spamming the credentials popup and rendering the app unusable.

Are there known steps to reproduce?

Deploy a reverse proxy configuration (for example, using nginx) and configure Basic Auth in the A-LLM endpoint).

Originally created by @Danoloan10 on GitHub (Sep 18, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2314 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? When deploying A-LLM behind a reverse proxy and configuring Básica Auth in the proxy, the app keeps rewriting the Authorization header to null, thus spamming the credentials popup and rendering the app unusable. ### Are there known steps to reproduce? Deploy a reverse proxy configuration (for example, using nginx) and configure Basic Auth in the A-LLM endpoint).
yindo added the possible bug label 2026-02-22 18:25:12 -05:00
yindo closed this issue 2026-02-22 18:25:12 -05:00
Author
Owner

@Danoloan10 commented on GitHub (Sep 18, 2024):

I'm trying to fix it in my fork for my personal deployment. Sucks bc it's much harder to use docker for a fork.

@Danoloan10 commented on GitHub (Sep 18, 2024): I'm trying to fix it in my fork for my personal deployment. Sucks bc it's much harder to use docker for a fork.
Author
Owner

@timothycarambat commented on GitHub (Sep 18, 2024):

This is not supported explicitly by the software, we use the Authorization header for our own auth system for single and multi-user and co-opting it will be something that will cause issues if you are trying to protect the app via Basic Auth.

Is there any reason the default built in auth system that used JWT will not suffice here? Otherwise this is out of scope for this use case

@timothycarambat commented on GitHub (Sep 18, 2024): This is not supported explicitly by the software, we use the `Authorization` header for our own auth system for single and multi-user and co-opting it will be something that will cause issues if you are trying to protect the app via Basic Auth. Is there any reason the default built in auth system that used JWT will not suffice here? Otherwise this is out of scope for this use case
Author
Owner

@Danoloan10 commented on GitHub (Sep 18, 2024):

I'll look into using JWT. I just wanted to put basic auth in the reverse proxy because I don't have any authentication service deployed in my domain, but I still want to (somewhat) protect the endpoint from the public. I just was wondering why the Authorization header must be overwritten to null, it seemed avoidable. Thanks for the response.

@Danoloan10 commented on GitHub (Sep 18, 2024): I'll look into using JWT. I just wanted to put basic auth in the reverse proxy because I don't have any authentication service deployed in my domain, but I still want to (somewhat) protect the endpoint from the public. I just was wondering why the Authorization header must be overwritten to null, it seemed avoidable. Thanks for the response.
yindo changed title from [BUG]: Basic Auth behind a reverse proxy is broken to [GH-ISSUE #2314] [BUG]: Basic Auth behind a reverse proxy is broken 2026-06-05 14:41:10 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1512