zhendongcmss opened a new issue, #7987:
URL: https://github.com/apache/apisix/issues/7987

   ### Description
   
   when apisix return 5xx http code, I want customize the return description 
and error page.  It include two sides.
   
   1. The short description of the error code. For example `HTTP/1.1 503 
Service Temporarily Unavailable`, I want modify it to `HTTP/1.1 503 Service 
Unavailable`.    I grep `Service Temporarily Unavailable` not found but fount 
it on nginx.  
https://github.com/nginx/nginx/blob/master/src/http/ngx_http_header_filter_module.c#L120
   2. The default error html page. I want return XML format string not html. 
For example :
    ```
   <html>
   <head><title>502 Bad Gateway</title></head>
   <body>
   <center><h1>502 Bad Gateway</h1></center>
   <hr><center>openresty</center>
   </body>
   </html>
   ```
   to 
   ```
   <?xml version="1.0" encoding="UTF-8" ?>
   <error>502</error>
   ```
   
   I found the error pages were defined on openresty and nginx.
   
   
https://github.com/openresty/openresty/blob/master/patches/nginx-1.11.2-builtin_error_page_footer.patch#L10
   
   
   Is it possible to just modify the source code of apisix above two points?
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.10.1
   - Operating system (run `uname -a`): centos7
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):1.19.3.2
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):3.4.14
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to