Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie “hf-chat” has been rejected because there is an existing “secure” cookie. #1627

Open
ljw20180420 opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ljw20180420
Copy link

Bug description

I use ghcr.io/huggingface/chat-ui-db:latest to host ChatUI in docker. If PUBLIC_ORIGIN="http://localhost" in .env.local and visit ChatUI through http://localhost:3000, it works well. Then I try to replace localhost by my domain name qiangwulab.sjtu.edu.cn. For the sake of testing, I modify /etc/hosts so that qiangwulab.sjtu.edu.cn is resolved to 127.0.0.1. I visit ChatUI through http://qiangwulab.sjtu.edu.cn:3000. It does not work with a similar page as in #1057. The firefox console shows

Cookie “hf-chat” has been rejected because a non-HTTPS cookie can’t be set as “secure”.

#1057 says that I should use ALLOW_INSECURE_COOKIES=true. It still does not work, and the firefox console shows

Cookie “hf-chat” has been rejected because there is an existing “secure” cookie.

ALLOW_INSECURE_COOKIES=true seems to be Legacy. Thus, I also tried COOKIE_SAMESITE="lax" and COOKIE_SECURE=false. The effect is the same. The firefox console shows

Cookie “hf-chat” has been rejected because there is an existing “secure” cookie.

Is it possible to use http for domain name other than localhost?

Steps to reproduce

Screenshots

Context

Logs

// logs here if relevant

Specs

  • OS: ubuntu 24.04
  • Browser: firefox
  • chat-ui commit: ghcr.io/huggingface/chat-ui-db:latest

Config

Notes

@ljw20180420 ljw20180420 added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant