发布 v0.5.1:恢复静态资源缓存、root 密码管理与 UI 优化 - #37
Merged
Merged
Conversation
修复内容: - 恢复 JS/CSS/字体等静态资源的长期浏览器缓存(max-age=604800, immutable), 仅 index.html 保持 no-cache,通过 ?v= 版本参数实现缓存失效。 此修复解决了 v0.5.0 引入的 WebUI 加载缓慢问题。 新增功能: - root 可在账号安全页面设置自己的密码(后端 API + WebUI + 中英文 i18n) - 账号安全页面重构:root 密码管理与 admin 密码管理分区显示 代码改进: - ts_service_dump() 改用 ts_service_get_stats() 安全接口 - 修复 GitHub Actions release 检查步骤的 gh CLI 鉴权问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
本次发布修复了 v0.5.0 引入的 WebUI 加载缓慢问题,新增 root 密码管理功能,并优化了账号安全页面布局。
变更内容
修复:WebUI 静态资源缓存策略恢复
Cache-Control改为no-cache, no-store, must-revalidate,导致浏览器每次页面切换都重新从 SPIFFS 下载全部资源,造成 WebUI 明显卡顿,SPI 总线争用也拖慢了 SD 卡访问。public, max-age=604800, immutable,仅index.html保持no-cache。OTA 后通过index.html中的?v=版本参数实现缓存失效。components/ts_net/src/ts_http_server.c新增:root 密码管理
auth.root.set_passwordts_api_auth.c、ts_security.h、ts_auth.c、app.js、api.js、zh-CN.js、en-US.js、style.css改进:代码质量
ts_service_dump()改用ts_service_get_stats()安全接口,避免直接访问内部结构体GH_TOKEN环境变量导致gh release view无法鉴权的问题测试计划