1
0
ミラー元 https://github.com/bumi/lnrpc 前回の同期 2025-07-01 17:59:39 +00:00

Inject macaroon metadata on all grpc calls

このコミットが含まれているのは:
bumi 2019-02-19 16:08:31 +01:00
コミット 9ec6414a2b

ファイルの表示

@ -6,11 +6,17 @@ module Lnrpc
@macaroon = macaroon_hex
end
def request_response(request:, call:, method:, metadata:)
def inject_macaroon_metadata(request:, call:, method:, metadata:)
if !metadata.has_key?('macaroon') && !metadata.has_key?(:macaroon)
metadata[:macaroon] = @macaroon
end
yield
end
alias :request_response :inject_macaroon_metadata
alias :client_streamer :inject_macaroon_metadata
alias :server_streamer :inject_macaroon_metadata
alias :bidi_streamer :inject_macaroon_metadata
end
end