mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-14 03:30:19 +00:00
57e725cbb3
* refactor: reduce unused code Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(desktop): prevent duplicate CORS headers in response Only add CORS headers if they don't already exist in the server response. This fixes issues with CDN resources (like cdn.jsdelivr.net) that already return CORS headers, causing "multiple values" errors. Fixes LOBE-2765 * 🔧 refactor(desktop): remove IpcServerMethod decorator and related metadata This update simplifies the IPC method handling by removing the IpcServerMethod decorator and its associated metadata management. The changes include updates to documentation and code references, ensuring a cleaner and more maintainable IPC implementation. No functional changes were introduced, but the codebase is now more streamlined for future development. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(desktop): introduce HTTP headers utility functions Added a new utility module for managing HTTP response headers in Electron, addressing case sensitivity issues. This includes functions to set, get, check existence, and delete headers. Updated the Browser class to utilize these utilities for setting CORS headers, ensuring no duplicates are present. This enhancement improves code maintainability and simplifies header management in the application. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>