Add custom headers to server response pages
We can add headers, which contain information about a custom response, to generated server responses.
Use the macros in the following table to define the information in the custom headers:
Macro Description TAM_OP The operation code for the response. The values for this macro are identical to the values for local response redirects. See Operation for local response redirection. AUTHNLEVEL Authentication level required by the authentication strength policy (step-up). ERROR_CODE The hexadecimal value of the error code. ERROR_TEXT The error message text associated with the error code in the message catalog. This text is supplied by WebSEAL. USERNAME The name of the logged in user. WebSEAL uses the value "unauthenticated" for users who are not logged in. CREDATTR{name} The value of the user credential attribute that has the specified name. For example, CREDATTR{tagvalue_session_index} returns the session token.
The http-rsp-header configuration entry defines the headers that are included with the server response pages. This configuration entry is in the [acnt-mgt] stanza of the WebSEAL configuration file.
The format of the configuration entry is:
http-rsp-header = <header-name>:<macro>
where
- <header-name>
- The name of the header to hold the value.
- <macro>
- The type of value that is to be inserted as described in Table 1.
For example, the following configuration entry includes the error message text from WebSEAL in a header named error_msg:
[acnt-mgt] http-rsp-header = error_msg:ERROR_TEXTWe can specify this configuration entry multiple times to include more than one custom header in the response.
For example:
[acnt-mgt] http-rsp-header = error_msg:ERROR_TEXT http-rsp-header = tam-error-code:ERROR_CODE
For further information, see the http-rsp-header configuration entry in the [acnt-mgt] stanza in the IBM Knowledge Center.
Parent topic: Web server response configuration
Related concepts
- Static server response pages
- Server response page locations
- Content Aware Server Responses
- HTML server response page modification
- Account management page configuration
- Error message page configuration
- Local response redirection
- HTML redirection
Related tasks
- Handling the favicon.ico file with Mozilla Firefox
- Configure the location URL format in redirect responses
Related reference