Help Center> ROMA Connect> User Guide> Service Integration Guide> Plug-in Management> HTTP Response Header Management Plug-in

HTTP Response Header Management Plug-in

Overview

An HTTP response header is a part of an API response. The HTTP response header management plug-in provides the capability of customizing HTTP response headers and returns the customized response headers in API responses.

Restrictions

  • The system response headers (such as x-apig-* and x-request-id) added on ROMA Connect cannot be modified.
  • The response headers added for CORS cannot be modified.

Parameter Description

Table 1 Configuration parameters

Parameter

Description

Name

Response header name. A response header with the same name (case-insensitive) cannot be added to each plug-in.

Value

Response header value. This parameter does not take effect and can be left blank if you set Action to Delete.

Action

Response header operation. You can override, append, delete, skip, or add response headers.

  • Override
    • The value of this response header will override the value of the same response header that exists in an API response.
    • If an API response contains multiple response headers with the same name, only the value of this response header will be returned.
    • If there is no response header with the same name in an API response, the value of this response header will be returned.
  • Append
    • The value of this response header will override the value of the same response header that exists in an API response.
    • If an API response contains multiple response headers with the same name, values of these response headers will be returned and separated with commas (,), appended by the value of this response header.
    • If there is no response header with the same name in an API response, the value of this response header will be returned.
  • Delete
    • This response header will be deleted if a response header with the same name exists in an API response.
    • If an API response contains multiple response headers with the same name, all these response headers will be deleted.
  • Skip
    • This response header will be skipped if a response header with the same name exists in an API response.
    • If an API response contains multiple response headers with the same name, values of all these response headers will be returned.
    • If there is no response header with the same name in an API response, the value of this response header will be returned.
  • Add

    The value of this response header will be returned in an API response even if the response contains a response header with the same name.

Script Configuration Example

{
  "response_headers": [
    {
      "name": "header1",
      "value": "test",
      "action": "append"
    },
    {
      "name": "header2",
      "value": "roma",
      "action": "override"
    }
  ]
}