1Panel/backend/constant
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.go feat: 增加同步本地应用功能 (#537) 2023-04-08 06:02:14 +00:00
backup.go feat: 增加后端对七牛云、腾讯云的适配 2023-04-06 09:01:33 +08:00
common.go feat: 增加一键部署网站功能 2022-11-17 21:20:33 +08:00
container.go feat: 修改配置文件,动态获取数据目录 2023-01-30 21:11:12 +08:00
dir.go feat: 增加同步本地应用功能 (#537) 2023-04-08 06:02:14 +00:00
errs.go fix: 获取网站日志时,先检查一下日志文件大小,超过10M时直接报错 (#1011) 2023-05-12 02:54:23 +00:00
nginx.go feat: 网站增加创建反向代理功能 2023-04-24 17:53:05 +08:00
runtime.go feat: 增加配置 php 配置文件功能 2023-04-06 10:38:14 +08:00
session.go fix: 修改 jwt 超时时间为 1 小时 (#437) 2023-03-29 07:34:13 +00:00
status.go fix: 防火墙禁 ping 增加判断条件,不存在文件则隐藏 (#643) 2023-04-14 09:14:57 +00:00
website.go feat: 增加配置 php 配置文件功能 2023-04-06 10:38:14 +08:00