All Products
Search
Document Center

Mobile Platform as a Service:Configure an HTML5 container

Last Updated:Jun 08, 2026

Modify HTML5 container switch configurations to control container behavior, such as enabling or disabling offline package signature verification.

You can modify switch configurations in the following ways:

  • Add custom_config.json to the config folder under assets in your portal or main application project. This method applies only to version 10.1.60 and later. Format of custom_config.json:

    [
    {
      "value": "NO",
      "key": "h5_shouldverifyapp"
    },
    {
      "value": "0",
      "key": "TSBS"
    }
    ]
  • Use H5ExtConfigProvider to configure switches in code. This method applies only to versions earlier than 10.1.60. Usage of H5ExtConfigProvider:

    public class H5ExtConfigProviderImpl implements H5ExtConfigProvider {
      @Override
      public String getConfig(String key) {
          if ("h5_shouldverifyapp".equalsIgnoreCase(key)) {
              return "YES";
          } else if ("TSBS".equalsIgnoreCase(key)) {
              return "0";
          }
          return null;
      }
    }
    // Call this method at startup. Only one global instance of H5ExtConfigProvider can be active. The last instance that is set takes precedence.
    H5Utils.setProvider(H5ExtConfigProvider.class.getName(), new H5ExtConfigProviderImpl());
  • Distribute switch configurations from the MDS platform. Switch configuration management.

List of container switches

The following table lists the available container switches.

Switch name

Purpose

Description

Default value

h5_shouldverifyapp

Enables or disables signature verification. Enable for online environments. On rooted devices, verification is forced on and this switch is ignored.

Set to YES to enable the feature. Set to NO to disable it.

YES

TSBS

Controls the immersive title bar. Android only.

Set to `1` to use it. Set to `0` not to use it.

Important

The values `1` and `0` are strings.

1

h5_remote_debug_host

Server address for remote app debugging.

  • Set h5_remote_debug_host to the debugging server address to enable remote app debugging.

  • Leave unset to disable remote app debugging. No default value.

-

androidFallbackNetwork

Controls whether the mPaaS network library loads fallback resources.

YES: uses the mPaaS network library. NO: uses the system network library.

YES

mp_h5_push_window_use_activity

Controls whether a new Activity is forced when `pushWindow` is called.

Set to YES to enable this feature. Other values disable it.

NO

mp_ta_showOptionMenu

Shows or hides the options menu in the upper-right corner of a miniapp.

Note

Takes effect only when the options menu visibility is configured during miniapp publishing.

Set to YES to display the menu. Other values hide it.

NO

mp_ta_showShareMenuItem

Shows or hides the share option in the miniapp options menu.

Set to YES to display the option. Other values hide it.

NO

mp_ta_use_orginal_mini_nagivationbar

Controls whether a miniapp uses the built-in navigation bar.

Set to YES to use it. Other values disable it.

YES

h5_CORSWhiteList

Domain whitelist for cross-domain access to offline resources.

Note

For online resources, configure the correct cross-domain settings on the resource server.

Format: JSON array. Special characters must be escaped. Example: { "value": "[\"oss-cn-hangzhou.aliyuncs.com\"]", "key": "h5_CORSWhiteList" }

Empty

mp_h5_allow_mix_content

Enables Mixed Content mode. Security risk — use with caution.

Note

Supported only in version 10.1.60.

Set to YES to allow the mode. Set to NO to disallow it.

NO