Hi team! I was setting up the project locally via ...
# openobserve
m
Hi team! I was setting up the project locally via
CONTRIBUTING.md
and ran into a CORS error on the login screen (UI on
8081
vs. API on
5080
). I’d love to raise a quick PR to fix this for future contributors. Which approach would you prefer? 1. Frontend fix: Add a Vite proxy in
web/vite.config.ts
to forward API calls to
5080
(looks like
stores/index.ts
already expects this). 2. Docs fix: Update
CONTRIBUTING.md
to run the backend with
ZO_WEB_URL="<http://localhost:8081>" cargo run
, which natively satisfies CORS.
p
localhost:8081 should work with localhost:5080. If it doesn't check these two env variables in your `.env`:
Copy code
ZO_WEB_URL = "<http://localhost:8081>"
ZO_CORS_ALLOWED_ORIGINS = "<http://localhost:3000>, <http://localhost:5173>, <http://localhost:8081>"
Option 2: If it still doesn't work, run
npm run build
and access the UI via
localhost:5080/web
instead. You will be able to test the entire UI from there.
m
Hi @Patel Bhargav Jayantibhai Yes option 1 works perfectly fine. Since
CONTRIBUTING.md
currently doesn't mention adding
ZO_WEB_URL
or
ZO_CORS_ALLOWED_ORIGINS
for local dev (which is why I got blocked out-of-the-box), would you like me to raise a quick PR to add them to the setup instructions?
p
sure
🙌 1