HTTP Status Message Variable
July 08, 2021 12:25PM
Hey,

Would Nginx consider adding a variable for the HTTP status message, like it already has for the status code ($status)? The projects I'm involved with make heavy use of the HTTP status message to elaborate HTTP responses — e.g. instead of a generic "403 Forbidden" the response would say "403 Account Not Verified". I'd like to configure Nginx to log those status messages along with other request info, but a $status_message variable doesn't seem to currently exist.

Similarly, it'd be nice to set the status message when responding from within Nginx with the `return` statement, but that's secondary to at least having the [proxied] response's status message in a variable.

Thanks in advance!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready