Open dokterbob opened 3 days ago
In addition, we should really not be using *
as default value for CORS headers, but rather default to the server's current host/port, localhost and require users to configure this in deployment, due to CSRF vectors.
Ref: #1512
The SocketIO server is currently getting
[]
as allowed CORS headers:https://github.com/Chainlit/chainlit/blob/fd882b82777ae9dd87d5a93c1d29af0064e1dcd7/backend/chainlit/server.py#L189
It should probably be set to the value of the
allow_origins
setting: https://github.com/Chainlit/chainlit/blob/fd882b82777ae9dd87d5a93c1d29af0064e1dcd7/backend/chainlit/config.py#L308Which are also referred to here: https://github.com/Chainlit/chainlit/blob/fd882b82777ae9dd87d5a93c1d29af0064e1dcd7/backend/chainlit/server.py#L200