WongSaang / chatgpt-ui

A ChatGPT web client that supports multiple users, multiple languages, and multiple database connections for persistent data storage. Provides Docker images and quick deployment scripts.
https://wongsaang.github.io/chatgpt-ui/
MIT License
1.51k stars 333 forks source link

服务端无法正常登录由于CSRF 安全问题 #202

Open qinjunnan opened 1 year ago

qinjunnan commented 1 year ago

Forbidden (403) CSRF verification failed. Request aborted.

http://192.168.1.5:9000/admin/login/?next=/admin/

这个问题如何解决呢?

Cocean001 commented 1 year ago

我的方法是把environment里的APP_DOMAIN改成实际访问的domain。 比如我通过外网访问,域名是testing.com,那我就填testing.com 如果我通过内网访问,地址是192.168.1.221,那我就填192.168.1.221 如果带端口的也一样,假设内网带端口地址为192.168.1.221:9010,那就填192.168.1.221:9010即可。 实测不要写http或https作为前缀。