Setting custom error status description

9 views
Skip to first unread message

Vitaly Zuevsky

unread,
Nov 13, 2022, 6:28:24 AM11/13/22
to openre...@googlegroups.com

Hi

 

I am aware how to set custom body returning an HTTP error. However, I do not want body. I only want to set status description e.g.,

 

HTTP/1.1 431 Bad Authority

Server: openresty/1.21.4.1

Date: Sun, 13 Nov 2022 11:26:05 GMT

Content-Length: 0

 

How could I add “Bad Authority” piece in my Lua?

 

Thank you.


Virus-free.www.avg.com

Junlong li

unread,
Nov 13, 2022, 8:48:07 AM11/13/22
to openresty-en
ngx.exit can not specify the "reason phrase".
If you would like to specify the "reason phrase", need to modify the ffi api

Reply all
Reply to author
Forward
0 new messages