Kris20030907 opened a new issue, #5721:
URL: https://github.com/apache/rocketmq-dashboard/issues/5721

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository 
and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   
   ### Studio Version
   
   branch: rocketmq-studio
   
   ### Runtime Environment
   
   OS: Ubuntu
   JDK 21, Node 20, Vite 6.4.3
   
   ### Connected RocketMQ Cluster
   
   .
   
   ### Build Toolchain
   
   .
   
   ### Describe the Bug
   
   Local login is impossible: the Vite dev server runs on 5173, but the default
   CORS whitelist only allows 5174, so every request is rejected with
   403 Invalid CORS request.
   
   ### Steps to Reproduce
   
   1. cd server && mvn spring-boot:run
   2. cd web && npm run dev
   3. Open http://localhost:5173/ and log in
   
   ### What Did You Expect to See?
   
   Login succeeds; http://localhost:5173 is allowed by default.
   
   ### What Did You See Instead?
   
   POST /api/auth/login with Origin: http://localhost:5173 -> 403 Invalid CORS 
request
   
   ### Additional Context
   
   server/src/main/resources/application.yml defaults to
   http://localhost:5174,http://127.0.0.1:5174 — everywhere else 
(vite.config.ts,
   deploy/docker-compose.yml, CorsConfig's @Value default) says 5173. Since
   application.yml always defines the property, the correct @Value default is 
dead code.
   
   Workaround: 
STUDIO_CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to