Commit 299710e4 authored by tufengqi's avatar tufengqi

fix service forece cookie version

parent a444ab21
<?php <?php
defined('SERVICE_FORCE_VERSION_KEY') || define('SERVICE_FORCE_VERSION_KEY', 'thrift_impl_version');
require_once __DIR__ . '/InitAppHelper.php'; require_once __DIR__ . '/InitAppHelper.php';
require_once $app_package_path . 'LoadConfig.php'; require_once $app_package_path . 'LoadConfig.php';
$cookie_version = $_COOKIE[VERSION_KEY] ?? ''; $cookie_version = $_COOKIE[SERVICE_FORCE_VERSION_KEY] ?? '';
$cookie_version = $cookie_version ? : ($_COOKIE[VERSION_KEY] ?? '');
$cookie_version = trim($cookie_version); $cookie_version = trim($cookie_version);
$version_val = $version_val_no_prefix = ''; $version_val = $version_val_no_prefix = '';
if (defined('IS_FORCE_ONLINE') && true === IS_FORCE_ONLINE) { if (defined('IS_FORCE_ONLINE') && true === IS_FORCE_ONLINE) {
...@@ -83,7 +85,6 @@ if (true === $location_default_version) { ...@@ -83,7 +85,6 @@ if (true === $location_default_version) {
defined('YII_DEBUG') || define('YII_DEBUG', true); defined('YII_DEBUG') || define('YII_DEBUG', true);
defined('YII_ENV_DEV') || define('YII_ENV_DEV', 'dev'); defined('YII_ENV_DEV') || define('YII_ENV_DEV', 'dev');
defined('APP_FOLDER') || define('APP_FOLDER', 'application'); defined('APP_FOLDER') || define('APP_FOLDER', 'application');
defined('SERVICE_FORCE_VERSION_KEY') || define('SERVICE_FORCE_VERSION_KEY', 'thrift_impl_version');
// swoole程序中每次访问可能根据用户请求带的版本号有所不同 // swoole程序中每次访问可能根据用户请求带的版本号有所不同
$GLOBALS['GLOBAL_VERSION_VALUE'] = $version_val; $GLOBALS['GLOBAL_VERSION_VALUE'] = $version_val;
$GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'] = $version_val_no_prefix; $GLOBALS['GLOBAL_VERSION_VALUE_NO_PTEFIX'] = $version_val_no_prefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment