Hi, I'm migrating from electron to Tauri, everything went smoothly, until i ended up in a CORS issue
[✔] Environment
- OS: Mac OS 15.3.1 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.85.0 (4d91de4e4 2025-02-17) (Homebrew)
✔ cargo: 1.85.0
✔ rustup: 1.28.0 (6e19fbec7 2025-03-02)
✔ Rust toolchain: stable-aarch64-apple-darwin
- node: 20.10.0
- yarn: 1.22.19
- npm: 10.2.3
- bun: 1.0.0
[-] Packages
- tauri 🦀: 2.3.1
- tauri-build 🦀: 2.0.6
- wry 🦀: 0.50.5
- tao 🦀: 0.32.8
- @tauri-apps/api : 2.4.0
- @tauri-apps/cli : 2.0.0-rc.18 (outdated, latest: 2.4.0)
[-] Plugins
- tauri-plugin-log 🦀: 2.3.1
- @tauri-apps/plugin-log : not installed!
- tauri-plugin-fs 🦀: 2.2.0
- @tauri-apps/plugin-fs : not installed!
- tauri-plugin-http 🦀: 2.4.2
- @tauri-apps/plugin-http : 2.4.2
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: React
- bundler: Vite
my api server is receiving the requests, but unable to receieve any response in tauri.
these are console logs that i get
[Error] Origin http://localhost:1420 is not allowed by Access-Control-Allow-Origin. Status code: 200
[Error] Fetch API cannot load http://localhost:4688/api/v1/contexts due to access control checks.
[Error] Failed to load resource: Origin http://localhost:1420 is not allowed by Access-Control-Allow-Origin. Status code: 200 (contexts, line 0)
my tauri.conf.json is: