Centos7下用Docker部署Seafile开源版 seafile-server-9.0.6 ,启用HTTPS后,登录后显示错误页面

如题启用HTTPS后,打开网页并登录显示类容如下:

Forbidden (403)
CSRF verification failed. Request aborted.
More information is available with DEBUG=True.

如果先行用HTTP完成登录后,再用HTTPS进行访问没有问题。
请教各路大神这个问题应该怎么解决?

补充seahub.log内容:
2022-07-19 18:28:47,488 [WARNING] django.security.csrf:224 log_response Forbidden (Referer checking failed - https://xxx.xxx.cn:6666/accounts/login/?next=/ does not match any trusted origins.): /accounts/login/

其中真实域名已用xxx.xxx.cn代替

controller.log内容:
2022-07-19 18:40:36 seafile-controller.c(481): Config [fileserver, use_go_fileserver] not set, default is FALSE.
2022-07-19 18:40:36 seafile-controller.c(191): starting seaf-server …
2022-07-19 18:40:36 seafile-controller.c(82): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -p /opt/seafile/seafile-server-9.0.6/runtime
2022-07-19 18:40:36 seafile-controller.c(116): spawned seaf-server, pid 73

问题已经解决,这个问题困扰我好几年了 :joy:
参照 Cannot login, CSRF error. 无法登陆,提示CSRF错误。

crystal
19 年 3 月
编辑nginx的conf文件,将
proxy_set_header Host $host;
替换为
proxy_set_header Host $host:xxxx;
xxxx为你设定的https的端口号

Tshine
19 年 12 月
改成
proxy_set_header Host $http_host;
也可以,
这个方式最好。

因为是新用户不能包含太多链接,所以对内容有所删减