oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
40.57k stars 5.31k forks source link

Oobabooga login not working through reverse proxy #6209

Open binkleym opened 4 months ago

binkleym commented 4 months ago

Describe the bug

I have the latest text-generation-webui (just ran the update script) running on my home computer running Windows 11. I am running it on a LAN IP (192.168.1.102) and reverse-proxying it with Nginx so I can access it remotely over the Internet.

Some recent update to text-generation-webui appears to have broken the login code. When I'm logging in from the LAN, I see the normal login screen, and authentication works. When I'm logging in from the WAN, I get a bare-bones UI which refuses to accept my login creds.

I have been running this setup for months without change, so my assumption is that it's a recent change in the text-generation-webui codebase that's behind it.

My CMD_FLAGS.txt is:

--gradio-auth myusername:mypassword --auto-devices --listen --listen-host 192.168.1.102 --listen-port 7860

Is there an existing issue for this?

Reproduction

  1. Start the webui on a WAN port.
  2. Reverse-proxy to a publically-accessible IP.
  3. Try to login.

Screenshot

Oobaboga_Login

Logs

I see repeated errors in the console:   "WARNING:  invalid HTTP request received", but no Python trace info.

System Info

Windows 11, NVidia Founder RTX 2060 Super.

Reverse proxy is NGinx running on Debian.   It uses Let's Encrypt so I can encrypt my remote connection.
binkleym commented 3 months ago

This may be related to this gradio bug: https://github.com/gradio-app/gradio/issues/8294

chen150450 commented 2 months ago

For Windows Platform: Because of gradio bug and some special bug interaction. I tried each version of gradio from 4.0.0 to 4.41.0. I finally chose version 4.20.1. Modify 'requirements.txt' : gradio==4.20.1. I tested that I could use the nginx reverse proxy normally, and the extranet ports were different, and the extranet used non-standard ports. gradio模块有bug,本人使用nginx反向代理内外端口不同,也遇到同样问题,通过修改根目录下'requirements.txt'文件,把里面的gradio==xx替换成gradio==4.20.1 解决。