How to detect a web app is in the preview mode?

Basically I need to know if a web app’s URL starts with https://platform.preview.appgyver.com/;
Or better if there is a way to know an app (any app) is launched in a preview mode?

Well, in the meantime I used the following formula: CONTAINS(systemVars.initialUrl, "platform.preview.appgyver.com") to initialize an app variable accordingly when in preview mode.