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 name | Description |
---|---|
HTTP_<Header-Name> | Will get the value of the header <Header-Name> replacing all "_" with "-" in the <Header-Name> (Apache-Header Syntax). |
REMOTE_ADDR | Gets the remote IP address. |
REMOTE_USER | The remote user. Will only be set if TraceRemoteUser is specified in the specific IdentityCreationFilter. |
REQUEST_METHOD | The request method. Usually 'POST' or 'GET'. |
REQUEST_URI | The request URI. |
REQUEST_URL | The request URL. |
PATH_INFO | The 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_STRING | The query string (something like name1=value1&name2=value2...). |
SERVER_NAME | The server name. |
SERVER_PROTOCOL | The server protocol, e.g., "HTTP/1.1". |
bcx.servlet.session.SSLCiphersUsed bcx.servlet.connection.SSLCiphersUsed | For TLS/SSL connections only. The cipher that has been used. |
bcx.servlet.session.SSLSessionId bcx.servlet.connection.SSLSessionId | For TLS/SSL connections only. The TLS/SSL session Id. |
bcx.servlet.session.SessionCookie bcx.servlet.connection.SessionCookie | The value of the session cookie (if available). |
bcx.servlet.connection.KeepAlives | The number of keep alives. |
bcx.servlet.session.HttpSessionId | Propagates 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.get | Only propagates the HTTP session ID if there is a session. |
bcx.servlet.session.HttpSessionId.getOrCreate | Always propagates the session ID. If there is no session, the variable creates a session with a session ID. |
bcx.servlet.session.information.ipB | The IP address of the backend. |
bcx.servlet.session.information.invS | The name of the matched servlet. |
bcx.servlet.request.TransferID | The 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.ThreadCounter | The number of current threads. |
bcx.servlet.request.HostName | The host name. |
bcx.servlet.request.Counter | The 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.FormRedirect | Set 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.Location | The 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.CharSet | The 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.HiddenFields | The 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_ID | The 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.loginid | The 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.MappedServlet | This attribute contains the name of the matched servlet before the servlet is reached. |
bcx.servlet.request.ServletPath | The path to which the servlet is mapped to for the incoming request |
bcx.servlet.FilterChain | Returns the filter chain that was called for the current request. |
bcx.servlet.connection.TimeSpentInFrontend | Returns the time spent to read/write the data from/to the frontend. |
bcx.servlet.connection.TimeSpentInTotalSoFar | Returns the time spent in total in the proxy until now. |
bcx.servlet.request.UnparsedUri | Returns the unparsed URI as it was received from the frontend (for example, the encrypted URI if an UrlEncryptionFilter was involved). |
UNIQUE_ID | A 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 |