mockttp
    Preparing search index...

    Interface MockttpAdminServerOptions

    interface MockttpAdminServerOptions {
        corsOptions?: CorsOptions & {
            allowPrivateNetworkAccess?: boolean;
            strict?: boolean;
        };
        debug?: boolean;
        ruleParameters?: { [key: string]: any };
        serverDefaults?: MockttpOptions;
        webSocketKeepAlive?: number;
    }

    Hierarchy

    • Omit<AdminServerOptions<{}>, "adminPlugins" | "pluginDefaults">
      • MockttpAdminServerOptions
    Index
    corsOptions?: CorsOptions & {
        allowPrivateNetworkAccess?: boolean;
        strict?: boolean;
    }

    Set CORS options to limit the sites which can send requests to manage this admin server.

    debug?: boolean

    Should the admin server print extra debug information? This enables admin server debugging only - individual mock session debugging must be enabled separately.

    ruleParameters?: { [key: string]: any }

    Some rule options can't easily be specified in remote clients, since they need to access server-side state or Node APIs directly. To handle this, referenceable parameters can be provided here, and referenced with a { [MOCKTTP_PARAM_REF]: <value> } value in place of the real parameter in the remote client.

    serverDefaults?: MockttpOptions

    Override the default parameters for servers started from this admin server. These values will be used for each setting that is not explicitly specified by the client when creating a mock server.

    webSocketKeepAlive?: number

    Set a keep alive frequency in milliseconds for the subscription & stream websockets of each session, to ensure they remain connected in long-lived connections, especially in browsers which often close quiet background connections automatically.