Skip to content

Function: isPreview

DefaultPreviewDecider.isPreview

isPreview(req): Promise\<boolean>

This function checks if the referrer (iframe parent) is the same as configured in the CoreConfig.fsServerOrigin. If this condition is met, the storefront is understood to be accessed through the FirstSpirit Content Creator.

Parameters

Name Type Description
req Request\<any, any, any, ParsedQs, Record\<string, any>> Access request data directly from the requesting browser.

Returns

Promise\<boolean>


Last update: March 22, 2024