Chat-UI throws an 403 forbidden when access settings
When viewing the settings page after first setup the settings page fives the error: Failed to load resource: the server responded with a status of 403 (Forbidden) settings:1 in the console. Without any explanation of what and why.
Setup:
services:
# Chat ui webserver
chat-ui:
container_name: chat
build:
context: ./
dockerfile: Dockerfile
ports:
- 8080:3000
networks:
default:
ipv4_address: 172.25.0.2
# Mongo database
database:
container_name: mongo-chatui
image: "mongo:latest"
ports:
- 27017:27017
restart: always
environment:
- MONGO_INITDB_DATABASE=chat-ui
networks:
default:
ipv4_address: 172.25.0.3
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.25.0.0/28
gateway: 172.25.0.1
And my .env.local:
MONGODB_URL=mongodb://172.25.0.3:27017
PUBLIC_ORIGIN=http://localhost:3030
HF_ACCESS_TOKEN=recacted
MODELS=recated
What are the steps to take here?
The database connections gets accepted according to the mongoDB instance
Not sure if this is the issue but your port in your PUBLIC_ORIGIN is different than your port in your docker compose file. Can you try fixing that to see if it works ?
I tried replicating a similar docker setup and don't have this issue so I think your PUBLIC_ORIGIN might be wrong here
Hi, tried that as well, but still got the same error.
Hi,
I am running a similar setup, without docker; I have the chat-ui app on an ec2 running on node as PORT=80 HOST=0.0.0.0 node build/index.js
my
APP_BASE=""
PUBLIC_ORIGIN=http://elasticip
when I access http://elasticip/settings, I get 403
it does work with vite dev, though..
Hi,
I am running a similar setup, without docker; I have the chat-ui app on an ec2 running on node as
PORT=80 HOST=0.0.0.0 node build/index.jsmy
APP_BASE=""
PUBLIC_ORIGIN=http://elasticip
when I access http://elasticip/settings, I get 403
it does work with vite dev, though..
Figured this out. I was serving the site without ssl. The cookie (hf-chat) being configured was set as secure cookie. Once I enabled ssl, the issue was sorted. The settings page came through without error.