Is there a way to determine if request is coming from client or another proxy?

sraina
Participant I

I would like to set header X-My-Header in the proxy layer, that can be passed to target service or other proxies as needed. However, I would like to ignore any such header passed by client.

Is there a way to know if a request originated at client and not another proxy?

0 1 2,971
1 REPLY 1

sidd-harth
Participant V

Hi @Sid Raina, I think we can use User-Agent request header to check if the call is coming from a client(browsers) or from another proxy(Service Callout).

The User-Agent request header contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent.

In Trace, you can see the User-Agent header if a call is made from a browser,

7093-user-agent.jpg


When a call is made from another proxy such as using Service Callout policy, there is no User-Agent request header,

7094-no-user-agent.jpg