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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to