简体   繁体   中英

How to capture client url in apigee?

How can I capture client url in apigee

I am using javascript in 'PreFlow' of 'Proxy endpoint'

context.setVariable("request.header.host",context.getVariable('request.header.host')) context.setVariable("request.header.origin",context.getVariable('request.header.origin'))

I do not get any value return for 'request.header.origin' and for 'request.header.host' i get the proxy end point

You want to get the url which is sent from client right?

If I understand correctly, try the code below:

In Proxy Endpoints you can use context.getVariable("proxy.url");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM