How Can I Access to location.protocol in an Apigee Policy

Not applicable

Hello,

I am trying to find out if I can access what protocol is used calling the proxy (http, https). In javascript, you can access it outside of Apigee by looking up "location.protocol", however, that does not work in apigee js policy. I looked to see if that there is an apigee variable that can have this info, but does not appear to be the case. Thanks!

Solved Solved
0 1 95
1 ACCEPTED SOLUTION

adas
New Member

@Ayman K. Please use client.scheme flow variable. If you are using it in a javascript policy then do

var scheme = context.getVariable("client.scheme")

For complete reference of flow variables supported by Apigee, please visit: http://apigee.com/docs/api-services/reference/variables-reference

View solution in original post

1 REPLY 1

adas
New Member

@Ayman K. Please use client.scheme flow variable. If you are using it in a javascript policy then do

var scheme = context.getVariable("client.scheme")

For complete reference of flow variables supported by Apigee, please visit: http://apigee.com/docs/api-services/reference/variables-reference