Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化来自前置代理的异常请求提示 #7115

Open
3 tasks done
ruibaby opened this issue Dec 5, 2024 · 0 comments · May be fixed by #7127
Open
3 tasks done

优化来自前置代理的异常请求提示 #7115

ruibaby opened this issue Dec 5, 2024 · 0 comments · May be fixed by #7127
Assignees
Labels
area/ui Issues or PRs related to the Halo UI kind/improvement Categorizes issue or PR as related to a improvement.

Comments

@ruibaby
Copy link
Member

ruibaby commented Dec 5, 2024

前置条件

  • 已经在 Issues 列表中搜索了相关问题。
  • 这是和 Halo 相关的特性,如果是非项目本身的问题,建议在 Discussions 提交。
  • 如果是插件和主题特性建议,请在对应的插件和主题仓库提交。

你当前使用的版本

2.20.11

描述一下此特性

根据 issue 反馈,发现不少来自前置代理或者 WAF 的异常,而这些异常往往和 Halo 没有任何关系,并且这些异常很难直观的看出是哪里产生的问题,会让使用者产生误解,也会对 Halo 维护者造成困扰,所以期望优化这些异常提示。

优化方案我建议判断异常请求的 response 类型,如果是 text/html,那么直接弹框显示这个 response 的 HTML 内容(因为大部分应用防火墙都会预设拦截页面)。如果不是 text/html,那么按照原来逻辑使用 toast 提示。

如图:

Image
Image

和前置代理或者 WAF 相关的 issue:

/area ui
/kind improvement

附加信息

No response

@f2c-ci-robot f2c-ci-robot bot added area/ui Issues or PRs related to the Halo UI kind/improvement Categorizes issue or PR as related to a improvement. labels Dec 5, 2024
@ruibaby ruibaby self-assigned this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Issues or PRs related to the Halo UI kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant