Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha committed Feb 5, 2025
1 parent bc5ceab commit 698a2b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ip-visit-counter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ func SendSqsMessage(c *gin.Context, message []byte) {
func getIpInfoGrpc(ip string, c *gin.Context) (*IpInfo, error) {
md := metadata.New(map[string]string{})
tenant, exists := c.Get("x-pg-tenant")

if exists {
md.Append("x-pg-tenant", tenant.(string))

}

ctx := metadata.NewOutgoingContext(c, md)
conn, err := grpc.NewClient(IpInfoGrpcAddress, grpc.WithInsecure())
if err != nil {
Expand Down

0 comments on commit 698a2b7

Please sign in to comment.