I needed to get a value passed in from a proxy server via the HTTP header. I’m using Oracle HTTP server.
Browsing the OTN Application Express forums, I learned that do this, one has to:
1. Edit the dads.conf to include the following line.
PlsqlCGIEnvironmentList [your variable name]
2. Add code to obtain that variable. I added a Display as Text item and made its source a PL/SQL Function or Expression.
The source value was:
OWA_UTIL.GET_CGI_ENV(‘[your variable name]‘);
Note that the following will print out all environment variables.
OWA_UTIL.PRINT_CGI_ENV;
You can put this code in a region of type pl/sql block, or as an item.

Oracle Apex With HTTPS and Proxy Server « Database Bulletin
May 26, 2010 @ 14:17:38