All Products
Search
Document Center

Mobile Platform as a Service:header settings

Last Updated:Jan 17, 2024

The gateway supports adding or removing headers for all requests. In the Header Settings section, click Modify to open the edit mode. Then, click the 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, the header is automatically added to the request. The business can obtain the header by MobileRpcHolder.

    • If you add a response header, the header is automatically added to the response. The client can obtain the header from the response.

  • Type: You can select add or delete.

    • Add: adds a new header. If an existing header exists in the original request, the new header is overwritten.

    • delete: deletes a header. You can configure the value or not to delete the header. If you specify a value, the field is deleted only when the value matches the specified value.

  • headerKey: headerKey can be any string that complies with RFC, except for HTTP-specific headers, such as host and content-type. headKey cannot be mpaasgw-specific headers, such as operation-type.

  • value: Can be any string.

  • Action: Delete the current header rule.

    Note

    Do not use the underscores "_" when defining HTTP headers.