request authorization with grpc (failure status code)

bmacphee nginx-forum at
Wed Jul 17 12:22:34 UTC 2019

Yes, I was trying various combinations of the following, with no success.

location @grpc_auth_fail {
       add_trailer grpc-status 16 always;
       add_header grpc-status 16 always;
       add_trailer grpc-message Unauthorized always;
       add_header grpc-message Unauthorized always;
       return 401;
       #return 200;

The choice of 16 for the status was based on this documentation (which is
similar to the one you linked):

Posted at Nginx Forum:,284718,284879#msg-284879

More information about the nginx mailing list