Skip to content

fix: fix embedding 403 CORS on Windows and blurry icon#371

Open
MorningStar0709 wants to merge 2 commits into
nashsu:mainfrom
MorningStar0709:fix/windows-cors-icon
Open

fix: fix embedding 403 CORS on Windows and blurry icon#371
MorningStar0709 wants to merge 2 commits into
nashsu:mainfrom
MorningStar0709:fix/windows-cors-icon

Conversation

@MorningStar0709

@MorningStar0709 MorningStar0709 commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Two small fixes for Windows users:

1. Fix embedding 403 Forbidden on Windows

When using Ollama as the embedding provider on Windows, Tauri's http plugin automatically injects Origin: http://tauri.localhost into requests. Ollama doesn't recognize this origin and returns 403 Forbidden.

This fix adds an explicit Origin: http://localhost header to embedding requests, matching the existing localLlmOriginHeader() pattern already used in llm-providers.ts for Ollama and Custom providers.

2. Fix blurry taskbar and tray icons on Win11 high-DPI

The icons/icon.png (512x512, highest quality source) was not included in tauri.conf.json bundle.icon list, resulting in a low-resolution .ico file that appears blurry on Windows 11 high-DPI displays.

Changes

  • src/lib/embedding.ts: Add Origin: http://localhost to request headers
  • src-tauri/tauri.conf.json: Add icons/icon.png to bundle icon list

Closes #367

MorningStar0709 and others added 2 commits June 1, 2026 21:34
…behavior

- Add system tray icon with Show/Quit menu and left-click window restore (tray.rs)
- Integrate tauri-plugin-autostart with Settings → General checkbox
- Add tauri-plugin-single-instance to prevent multiple app instances
- Implement 3-state close behavior (ask/exit/minimize) with auto-remember
- Add Settings → General close behavior dropdown selector
- Persist close behavior to app-state.json from Rust close handler
- Add store.save() force-flush in saveGeneralConfig for reliable persistence
- Wrap set_close_behavior IPC in try-catch during app startup
- Return Result from set_close_behavior command for validation feedback
- Update i18n keys for zh/en, remove unused minimizeToTray keys
- Fix Windows path separator and timing issues in integration tests

🤖 Generated with [Qoder][https://qoder.com]
- Add Origin: http://localhost header for embedding requests

Tauri HTTP plugin on Windows injects Origin: http://tauri.localhost which Ollama rejects with 403. This matches the existing localLlmOriginHeader() pattern in llm-providers.ts.

- Add icons/icon.png (512x512) to tauri.conf.json bundle.icon list to fix blurry taskbar/tray icons on Win11 high-DPI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedding configuration error (API 403 Forbidden)

1 participant