* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Feature; use Configuration; /** * Defines if token in urls are disabled. */ final class TokenInUrls { public const DISABLED = 'disabled'; public const ENV_VAR = '_TOKEN_'; /** * @return bool */ public static function isDisabled() { return (bool) Configuration::get('PS_SECURITY_TOKEN') === false || getenv(self::ENV_VAR) === self::DISABLED; } }