Commit Graph
48 Commits
Author SHA1 Message Date
can4hou6joeng4 81c46d754e fix(sync): 修复自托管下无法读取 Upstash 配置
app/api/user/{sync,config} 用 @upstash/redis/cloudflare 的
Redis.fromEnv() 创建客户端。该实现只读传入的 env 参数或 Cloudflare
全局绑定,从不回退到 process.env,因此在 Docker / Node 自托管下
url 与 token 恒为 undefined,两个接口必定返回 500,跨设备同步
(收藏、历史、设置)完全不可用。认证走的是 auth.ts 里的
new Redis({ url, token }),所以登录正常,只有用户数据读写失败。

把 auth.ts 中已有的双源回退抽成 lib/server/runtime-env.ts,Redis
客户端抽成 lib/server/redis.ts,两个路由改为惰性获取共享客户端。
惰性创建同时修正了另一个隐患:Cloudflare 的 per-request 绑定在
模块求值阶段不可达,而原先客户端是在模块作用域创建的。

未配置 Upstash 时返回 503 并给出明确说明,而不是当成请求失败。

Fixes #226
2026-07-31 10:12:40 +08:00
Codex 27d30139c1 fix: support Upstash Redis on Cloudflare Pages 2026-07-20 16:13:51 +08:00
kuekhaoyang 66d8564dd2 fix issue 210 slow source search reliability 2026-07-13 21:09:47 +08:00
kuekhaoyang d6f2a2e3c7 fix login gate session loop 2026-07-09 17:39:46 +08:00
kuekhaoyang 610f57c5b0 fix auth sync requests after login 2026-07-09 16:33:44 +08:00
kuekhaoyang 49951c67ef Fix source resolution badge probing 2026-04-16 16:31:17 +08:00
kuekhaoyang 19e9707041 Fix managed auth and source list regressions 2026-04-15 23:04:41 +08:00
kuekhaoyang 833077a1f6 fix(cloudflare): remove node-only site icon route 2026-04-12 12:23:03 +08:00
kuekhaoyang 4fb718f8d8 feat(settings): add version and update status 2026-04-12 11:57:38 +08:00
kuekhaoyang 727fc2b0ed fix(docker): make the site icon configurable at runtime
Add SITE_ICON_FILE and SITE_ICON_URL support for the Docker image, route the app shell and manifest through a runtime icon endpoint, document the new Docker branding flow, and bump the app version to 4.8.3.
2026-04-12 11:26:57 +08:00
kuekhaoyang 4db08dbf72 fix: sync runtime config into settings 2026-04-08 13:36:09 +08:00
kuekhaoyang 37b6e160d7 fix remaining issue 72 ui and iptv regressions 2026-04-02 22:14:46 +08:00
kuekhaoyang 5829a79ee3 fix: enforce compliance mode for managed deployments 2026-04-02 21:42:00 +08:00
mayziran 91bb481c4e docker弹幕环境变量修复 2026-03-26 15:23:43 +08:00
kuekhaoyang 91a89e8bf2 Fix issue #72 follow-ups and IPTV source handling 2026-03-26 14:16:58 +08:00
kuekhaoyang 064a27c8b6 feat: implement Upstash Redis for user config sync, replacing file-based persistence 2026-03-18 12:52:24 +08:00
kuekhaoyang 3564ce1ede chore: update package versions and add user config sync API
- Bump version to 4.8.0 and update dependencies in package.json
- Implement user config sync API for cross-device settings persistence
- Add resolution badge auto-hide hook for improved user experience
- Create useConfigSync hook to manage user settings synchronization with the server
2026-03-18 12:44:05 +08:00
kuekhaoyang f7a166ea19 feat: implement Probe Resolution API and add useResolutionProbe hook for video resolution detection 2026-03-12 23:34:00 +08:00
kuekhaoyang c95d7d5d95 feat: add premium password protection and enhance search functionality
- Implemented a separate password for premium content access via `PREMIUM_PASSWORD` environment variable.
- Added a `PremiumPasswordGate` component to manage access to premium content.
- Enhanced search functionality to support Traditional Chinese to Simplified Chinese conversion for broader search compatibility.
- Introduced automatic video quality labels in search results for better user experience.
- Added support for IPTV sources configuration through environment variables.
- Enabled merging of sources in search results based on environment variable settings.
- Updated volume control logic to handle mute state more effectively in video playback.
- Improved README documentation to reflect new features and configurations.
2026-03-01 12:06:53 +08:00
vvwnandGitHub 1d777968f3 Add user sync API with Redis integration
Implement GET and POST endpoints for user sync data with Redis.
2026-02-24 14:50:42 +08:00
vvwnandGitHub 4f894c6011 Delete app/api/user/sync/route.ts 2026-02-24 14:49:10 +08:00
vvwnandGitHub 57c00c9611 Add user sync route with GET and POST methods
Implement GET and POST handlers for user sync data using Upstash Redis.
2026-02-24 14:18:44 +08:00
vvwnandGitHub e8681c4ac9 Delete app/api/user 2026-02-24 14:11:15 +08:00
vvwnandGitHub 628c85299d Create user 2026-02-24 14:09:46 +08:00
vvwnandGitHub eddcee2abf Delete app/api/user directory 2026-02-24 14:09:02 +08:00
vvwnandGitHub 6e2561c3b9 Add user sync API with Redis integration
Implement GET and POST endpoints for user sync data with Redis.
2026-02-24 14:07:45 +08:00
kuekhaoyang 29b649b731 feat: Enhance IPTV stream proxy with robust M3U8 detection and add Cloudflare Pages configuration, alongside minor UI layout adjustments. 2026-02-20 17:52:41 +08:00
kuekhaoyang 4f91549ca9 feat: Update IPTV API routes to use Edge runtime. 2026-02-19 14:31:59 +08:00
kuekhaoyang c0fcfcc4ac feat: implement IPTV channel search debouncing and pagination, add video source auto-fallback, and improve type normalization. 2026-02-19 14:27:17 +08:00
kuekhaoyang 9ea9f85507 feat: Implement user-defined video sources and danmaku API management with new settings pages and a dedicated store. 2026-02-19 11:56:14 +08:00
kuekhaoyang 54263f926b feat: Implement granular role-based access control, enhance IPTV stream proxy with header forwarding, and improve IPTV store with per-source channel caching. 2026-02-18 10:24:03 +08:00
kuekhaoyang 6a2e28c615 feat: Implement IPTV stream proxy to resolve CORS issues and refine desktop player menu positioning for fullscreen. 2026-02-17 17:57:56 +08:00
kuekhaoyang 5d139114b5 feat: Implement IPTV functionality with channel management and player, and add admin account configuration generation. 2026-02-17 16:37:53 +08:00
kuekhaoyang df37806de7 feat: Implement danmaku (bullet comments) functionality with API integration, settings, and player display. 2026-02-17 10:21:07 +08:00
kuekhaoyang 0753492dfd feat: Implement new authentication and account management system, refactoring password gates and settings components. 2026-02-17 00:09:56 +08:00
kuekhaoyang 98e314e31a feat: Implement settings password protection with a dedicated gate, management UI, and API integration. 2026-02-16 22:54:16 +08:00
kuekhaoyang bc25be5b05 feat: Implement parallel multi-page fetching from each search source and introduce client-side load more pagination for aggregated results. 2026-02-16 11:32:20 +08:00
kuekhaoyang c492dc310b feat: Implement password persistence using localStorage, controlled by the new PERSIST_PASSWORD environment variable. 2026-01-25 10:41:24 +08:00
kuekhaoyang 1cf4a6b509 Update 2026-01-13 15:42:03 +08:00
kuekhaoyang 43279c2e1a Fix image not load 2026-01-13 15:37:38 +08:00
kuekhaoyang 26cfa10c3a feat: Replace adult and secret content features with a new premium content system. 2026-01-04 19:04:27 +08:00
kuekhaoyang 8dd9bb67b5 feat: Add Douban tags API, enhance popular movies hook, and improve Chinese localization. 2026-01-02 13:42:20 +08:00
kuekhaoyang c920a3160a feat: Introduce display settings for real-time latency and search mode, enhance video player controls, and add a generic UI switch component. 2025-12-29 10:48:25 +08:00
kuekhaoyang 95cee83bf4 feat: Synchronize environment-provided subscription sources with user settings. 2025-12-25 16:57:15 +08:00
kuekhaoyang 7c1f1db046 refactor: remove runtime fetching of environment subscriptions and envSubscriptionsSet state. 2025-12-25 16:38:27 +08:00
kuekhaoyang 48d6568a70 feat: add support for environment variable defined subscription sources and runtime config API 2025-12-25 16:25:53 +08:00
kuekhaoyang 082437a961 feat: Configure adult types API route to use edge runtime. 2025-12-25 00:00:41 +08:00
kuekhaoyang 43a35e3f47 new 2025-12-24 23:53:24 +08:00