Skip to main content
Version: 7.2402.x.x RR

Environment variables

Various filters and servlet can access environment variables using the code snippet ENV:<variable name>. The following ENV variables are usually available:

Variable nameDescription
HTTP_<Header-Name>Will get the value of the header <Header-Name> replacing all "_" with "-" in the <Header-Name> (Apache-Header Syntax).
REMOTE_ADDRGets the remote IP address.
REMOTE_USERThe remote user. Will only be set if TraceRemoteUser is specified in the specific IdentityCreationFilter.
REQUEST_METHODThe request method. Usually 'POST' or 'GET'.
REQUEST_URIThe request URI.
REQUEST_URLThe request URL.
PATH_INFOThe path info part of the request uri. The value of the path info depends on the mapping of the matched servlet. It is determined like that: requesturi = servlet mapping + pathinfo For example if the request uri is /path1/path2/path3/path4/and the matching servlet of the request is mapped to '/path1/path2/*', then the path info is set to 'path3/path4/'. This variable has nothing to do with the apache environment variable of the same name
QUERY_STRINGThe query string (something like name1=value1&name2=value2...).
SERVER_NAMEThe server name.
SERVER_PROTOCOLThe server protocol, e.g., "HTTP/1.1".
bcx.servlet.session.SSLCiphersUsed bcx.servlet.connection.SSLCiphersUsedFor TLS/SSL connections only. The cipher that has been used.
bcx.servlet.session.SSLSessionId bcx.servlet.connection.SSLSessionIdFor TLS/SSL connections only. The TLS/SSL session Id.
bcx.servlet.session.SessionCookie bcx.servlet.connection.SessionCookieThe value of the session cookie (if available).
bcx.servlet.connection.KeepAlivesThe number of keep alives.
bcx.servlet.session.HttpSessionIdPropagates the HTTP session ID (if available). To further control the propagation of the HTTP session ID, you can use the variables bcx.servlet.session.HttpSessionId.get and bcx.servlet.session.HttpSessionId.getOrCreate (see below).
bcx.servlet.session.HttpSessionId.getOnly propagates the HTTP session ID if there is a session.
bcx.servlet.session.HttpSessionId.getOrCreateAlways propagates the session ID. If there is no session, the variable creates a session with a session ID.
bcx.servlet.session.information.ipBThe IP address of the backend.
bcx.servlet.session.information.invSThe name of the matched servlet.
bcx.servlet.request.TransferIDThe transfer ID is the same as the UNIQUE_ID. It can be configured via the bc property ch.nevis.navajo.tracing.TraceId.Format
bcx.servlet.request.ThreadCounterThe number of current threads.
bcx.servlet.request.HostNameThe host name.
bcx.servlet.request.CounterThe number of requests. Will only be set if the bc-property ch.nevis.navajo.runtime.RequestCounting is set to true.
bcx.servlet.request.Header.<Header-Name>Will get the value of the header <Header-Name>.
ch.nevis.nevisproxy.redirect.FormRedirectSet if an AutoForm-redirect-page is sent to the frontend. This can be used for example by the LuaFilter to create a specific page instead of the standard page created by nevisProxy.
ch.nevis.nevisproxy.redirect.FormRedirect.LocationThe location to redirect to. It is already HTML-encoded. It is only set if ch.nevis.nevisproxy.redirect.FormRedirect is specified.
ch.nevis.nevisproxy.redirect.FormRedirect.CharSetThe charset used for the hidden fields. The page should use the same charset (if you use a specific one). It is only set if ch.nevis.nevisproxy.redirect.FormRedirect is specified.
ch.nevis.nevisproxy.redirect.FormRedirect.HiddenFieldsThe hidden fields of the form. They are already in HTML tags and HTML-encoded. It is only set if ch.nevis.nevisproxy.redirect.FormRedirect is specified.
SESSION_IDThe session ID. To further control the propagation of the HTTP session ID, you can use the variables bcx.servlet.session.HttpSessionId.get and bcx.servlet.session.HttpSessionId.getOrCreate (both variables are also described in this table).
ch.nevis.session.loginidThe login ID. Will only be set if TraceRemoteUser is specified in the specific IdentityCreationFilter.
<apache-env-key>An Apache-internal key. To trace all Apache-internal keys, set the following value: ENV:TRACE_APACHE_ENV:JustForLogging This will trace all Apache keys in the trace group NavajoRequest:INFO. Do not forget to remove the line ENV:TRACE_APACHE_ENV:JustForLogging from your DelegationFilter after tracing.
ch.nevis.navajo.chain.MappedServletThis attribute contains the name of the matched servlet before the servlet is reached.
bcx.servlet.request.ServletPathThe path to which the servlet is mapped to for the incoming request
bcx.servlet.FilterChainReturns the filter chain that was called for the current request.
bcx.servlet.connection.TimeSpentInFrontendReturns the time spent to read/write the data from/to the frontend.
bcx.servlet.connection.TimeSpentInTotalSoFarReturns the time spent in total in the proxy until now.
bcx.servlet.request.UnparsedUriReturns the unparsed URI as it was received from the frontend (for example, the encrypted URI if an UrlEncryptionFilter was involved).
UNIQUE_IDA unique ID identifying the request. It is the same ID as the transfer ID (bcx.servlet.request.TransferID). The format can be configured via the bc property ch.nevis.navajo.tracing.TraceId.Format