HEADER (Dedicated)

The HEADER element defines a custom header in an application configuration file that is dedicated to a specific application or service.

Syntax

<HEADER Name="header-name">header-value</HEADER>
  1. header-name defines the unique identifier for the HTTP header.
  2. header-value is a value for the header.

Child elements

There are no child elements.

Usage

Use this element to define HTTP headers in configuration files for applications and services. Its is only valid in external application configuration files, not in the JGAS configuration file (as.xcf).

You can configure several HEADER elements to define custom headers that apply to a specific application or service. These headers are always sent in the HTTP response. The JGAS sends these in addition to headers defined for all applications in the HEADER element of the JGAS configuration file. If the same HEADER element is set in both the application configuration file and the JGAS configuration file, the HEADER defined in the application configuration file is used; the JGAS configuration file is ignored.

Limitations

The headers defined in HEADER elements of an application configuration file are not sent in the response of URLs for public resources, such as images (/ua/i) and reports (/ua/report/). As these are public URLs, the HEADER defined for individual applications or services cannot be applied; only the common HEADER defined in the JGAS configuration file will apply.

The following examples outline how to configure the custom HTTP headers sent in HTTP responses for your application or service.

Example: Application configuration file with custom headers

<?xml version="1.0" encoding="UTF-8" ?>
<APPLICATION >
    <PATH>$(res.deployment.path)</PATH>
    <MODULE>myapp</MODULE>
  </EXECUTION>
  <HTTP>
    <HEADER Name="Header_1">Hello</HEADER>
    <HEADER Name="Header_2">World</HEADER>
    <HEADER Name="Header_3">How</HEADER>
    <HEADER Name="Header_4">Are</HEADER>
    <HEADER Name="Header_5">You</HEADER>
  </HTTP>
</APPLICATION>

Example: web service configuration file with custom headers

<?xml version="1.0" encoding="UTF-8" ?>
<APPLICATION >
  <EXECUTION>
    <ENVIRONMENT_VARIABLE Id="FGLWSDEBUG">0</ENVIRONMENT_VARIABLE>
    <PATH>$(res.deployment.path)</PATH>
    <MODULE>myservice</MODULE>
  </EXECUTION>
  <HTTP>
    <HEADER Name="Header_1">Hello</HEADER>
    <HEADER Name="Header_2">World</HEADER>
    <HEADER Name="Header_3">How</HEADER>
    <HEADER Name="Header_4">Are</HEADER>
    <HEADER Name="Header_5">You</HEADER>
  </HTTP>
</APPLICATION>

Parent elements

This element is a child of the HTTP (Dedicated) element.