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

help request: Some questions about error_page #11855

Open
Lewisyixin opened this issue Dec 24, 2024 · 1 comment
Open

help request: Some questions about error_page #11855

Lewisyixin opened this issue Dec 24, 2024 · 1 comment
Labels
question label for questions asked by users

Comments

@Lewisyixin
Copy link

Description

Apisix doesn't have plugins about error_page which is useful in some scene. And I tried the following 2 ways:

  1. Add error_page config in http_server_configuration_snippet
    image
    this way works well when there comes 5xx requests. But I found these 5xx requests could't be recorded in metrics(prometheus plugin)
  2. Based on step 1, I add lua phase config
    image
    And this time 5xx request successfully recorded in metrics

But I still have 2 questions:

  1. Are there any risks in the configuration of step 2?
  2. I found that there is error_page configurations in the 2.15 version code but removed in version 3(https://github.com/apache/apisix/blob/2.15.3/apisix/cli/ngx_tpl.lua#L574), so I just want to know why remove these error_page code?

Environment

  • APISIX version (run apisix version): 3.5
  • Operating system (run uname -a): 3.10.0-514.26.2.el7.x86_64
  • OpenResty / Nginx version (run openresty -V or nginx -V): nginx version: openresty/1.21.4.2
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): 3.5
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version): 2.3.0
@dosubot dosubot bot added the question label for questions asked by users label Dec 24, 2024
@fanchangjifen
Copy link

response rewrite不能自定义error page吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question label for questions asked by users
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants