Pass metadata to Kalix service from Play

Hello!

I’m not able to send custom metadata from Play (using play-grpc) to a Kalix service.

    singleResponseRequestBuilder
      .addHeader("Authorization", "BAR")
      .addHeader("X-Request-Id", "1234")
      .invoke(request)

Only the Authorization header is passed. The X-Request-Id is not. Is this expected behavior? If yes, is it because such values are expected to be passed as claims?

Thanks.

Hi,

You’re right, only “Authorization” is passed by default. Otherwise, you need to specifically add the header to an allow list. See the original message from Johan for an example:

(Something we need to add to our docs I reckon.)

Ah, interesting. Thanks @efgpinto