1Panel/backend
Mystery0 M 4c39955f2f
fix: 获取网站日志时,先检查一下日志文件大小,超过10M时直接报错 (#1011)
#### What this PR does / why we need it?

修复网站日志文件较大时,在界面上查看日志会导致系统短时间卡住的问题

相关Issue https://github.com/1Panel-dev/1Panel/issues/495
该提交可优化这个Issue的问题

#### Summary of your change

在获取文件内容之前,通过os.Stat获取文件的信息,并对文件大小进行判断,如果过大(目前是>10MB),则抛出错误中止流程

#### Please indicate you've done the following:

- [ ] Made sure tests are passing and test coverage is added if needed.
- [x] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
2023-05-12 02:54:23 +00:00
..
app fix: 获取网站日志时,先检查一下日志文件大小,超过10M时直接报错 (#1011) 2023-05-12 02:54:23 +00:00
buserr feat: 修改应用端口,同时修改网站配置 2023-03-08 23:59:55 +08:00
configs fix: 安全入口逻辑调整 (#821) 2023-04-27 14:44:16 +00:00
constant fix: 获取网站日志时,先检查一下日志文件大小,超过10M时直接报错 (#1011) 2023-05-12 02:54:23 +00:00
cron fix: 解决定时任务停止网站失败的问题 (#933) 2023-05-08 09:03:41 +00:00
global feat: 修改配置文件,动态获取数据目录 2023-01-30 21:11:12 +08:00
i18n fix: 修改初始化错误返回 (#873) 2023-05-05 03:40:51 +00:00
init feat: app.yaml 增加 username 和 password 参数 (#960) 2023-05-09 09:31:44 +00:00
log fix: 解决 go 版本升级导致的代码警告 (#527) 2023-04-07 03:30:10 +00:00
middleware fix: 时区问题修改 (#855) 2023-05-04 04:00:37 +00:00
router fix: 删除初始化用户界面及接口 (#874) 2023-05-05 03:56:52 +00:00
server feat: 增加系统 ssl 设置功能 (#780) 2023-04-25 06:34:16 +00:00
utils fix: ntp 依赖修改 (#983) 2023-05-10 06:36:15 +00:00