I have a JavaScript policy, in the default endpoint preflow, with the following statement:
print('CLIENT SCHEME: ' + context.getVariable("client.scheme"));
If I make a call using https, it will print "CLIENT SCHEME: http". I have tested with curl calls and calls made from a web page running in https.
@williamking , Are you on cloud / OPDK ? OnCloud, I am unable to reproduce above issue. See attached screenshot. It works as per design. Am i missing something ?
It is running in the cloud. Please find attached a proxy I just made to demo the behavior I'm seeing. It might be something specific to our instance running in EDGE.
(Note that it is a gzip file. I've changed the extension to "txt" to be able to upload.)
@williamking , I just used your proxy in one of my trial org , It works as per design. Looks like it's specific to your org / your org might be running on the different version. Please talk to support to resolve the issue.
Here is the screenshot from your proxy trace session,
,
Have you tried context variable (request.header.X-Forwarded-Proto). This should give you the value of http vs https.
@MEGHDEEP BASU , client.scheme also works as expected, I think it's an org specific issue which need to be resolved by support.
Yes. You are right. The "client.scheme" also works for me.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |