Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

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 119
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