large_client_header_buffers: Custom error pages are not working
prajos
nginx-forum at forum.nginx.org
Tue Jun 5 13:14:16 UTC 2018
Thanks Maxim Dounin,
The trick worked.
I did something like the following:
server {
large_client_header_buffers 12 64;
...
error_page 494 =400 /400.json;
error_page 400 /400.json;
location = /400.json {
add_header Funky-Header1 'Funky Value' always;
root /etc/nginx/error-files/;
allow all;
internal;
}
}
& now I'm able to get my custom message and Header.
Cheers
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,280035,280044#msg-280044
More information about the nginx
mailing list