Alokai

MiddlewareSettingsConfig

Settings provided in the middleware.config.js file.

interface MiddlewareSettingsConfig {
	channelId: number;
	cookie_options?: CookieOptionsList;
	generateJwtPayload?: (params: GenerateJwtPayloadParams) => JwtPayload;
	jwtTokenExpirationDays: number;
	loginUrlType?: UrlType;
	sdkSettings: MiddlewareSDKSettingsConfig;
	secureCookies: boolean;
	secureOrderAPIs?: boolean;
	stdTTL?: number;
}

Properties

NameRequiredTypeDescription
channelIdRequirednumberChannel ID is an identifier of a store when using a multistore feature. By default it's 1. Please use the @vue-storefront/multistore to set it depending on the domain.
cookie_optionsOptionalCookieOptionsListCustom cookie options
generateJwtPayloadOptional(params: GenerateJwtPayloadParams) => JwtPayloadAn optional parameter that allows to override the default JWT payload generation.
jwtTokenExpirationDaysRequirednumberJWT token expiration days.
loginUrlTypeOptionalUrlTypeIndicates url type use for performing login. By default it's set to UrlType.Canonical. It could be "primary" | "canonical" | "checkout"
sdkSettingsRequiredMiddlewareSDKSettingsConfigBigCommerce SDK settings.
secureCookiesRequiredboolean
secureOrderAPIsOptionalbooleanIndicates to use secure order APIs by requiring authentication.
stdTTLOptionalnumberNode cache standard ttl configuration in seconds. By default it's set to 86400 seconds.

Referenced Types

On this page