The gateway supports adding or removing headers for all requests. In the Header Settings section, click Modify to open the edit mode, and then click Add to add a rule. Each rule contains five attributes: location, type, headerKey, value, and action.
-
Location: Select the request header or response header.
-
If you add a request header, it is automatically included in the request. Your application can retrieve the header through MobileRpcHolder.
-
If you add a response header, it is automatically included in the response. The client can retrieve the header from the response.
-
-
Type: Select add or delete.
-
Add: adds a new header. If a header with the same key already exists, it is overwritten.
-
Delete: removes a header. If you specify a value, the header is removed only when its current value matches the specified value.
-
-
headerKey: Any RFC-compliant string, except HTTP-specific headers such as host and content-type, or mpaasgw-specific headers such as operation-type.
-
value: Any string.
-
Action: Delete the current header rule.
NoteDo not use underscores (_) when defining HTTP headers.