run-llama / create-llama

The easiest way to get started with LlamaIndex
MIT License
1.05k stars 135 forks source link

CORS is missing in the newly generated frontends #444

Open KenjiPcx opened 19 hours ago

KenjiPcx commented 19 hours ago

Issue

CORS seems to be missing when generating the NextJs frontend with a FastAPI backend.

Reproduction Steps

  1. Create an app with the agentic RAG option (create-llama version 0.3.16)
  2. Run frontend and backend and send a message

Fix

Just need to add CORS back. Would've created a PR to fix this, but am held up today, so just reporting the issue here for now :)

leehuwuj commented 11 hours ago

Hi @KenjiPcx, you can now directly access the chat UI using the backend address, like http://localhost:8000, so it should work without any CORS issues!

marcusschiesser commented 10 hours ago

yes, @KenjiPcx we removed that on purpose, what's your use case for using CORS?

KenjiPcx commented 10 hours ago

Oh I see I've been accessing the frontend through localhost:3000 and it was throwing errors

KenjiPcx commented 10 hours ago

Did anything change with logging too? I can only see the logs of the backend starting and restarting but unable to view logs from anywhere else 😔