通过docker部署禅道,升级15.5后,原有正常的https访问无法登录了,也不提示错误 部署方式为 nginx(443)做ssl转发 -> docker ->php
升级15.5后,使用 https://zentao.xxx.com登录异常,使用http://zentao.xxx.com登录没问题。
进入到禅道的根目录,我的是/data/zentao/www/这是我docker映射到外部的,也就是zentaopms下面
注释掉下面的三行
vim /data/zentao/www/framework/base/router.class.php
#找到https
/* Change for CSRF. */
if($this->config->framework->filterCSRF)
{
//$httpType = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') $httpType = 'https';
if(isset($_SERVER['REQUEST_SCHEME']) and strtolower($_SERVER['REQUEST_SCHEME']) == 'https') $httpType = 'https';
//$httpHost = zget($_SERVER, 'HTTP_HOST', '');
$apiMode = (defined('RUN_MODE') && RUN_MODE == 'api') || isset($_GET[$this->config->sessionVar]);
//if(!$apiMode && (empty($httpHost) or strpos($this->server->http_referer, "$httpType://$httpHost") !== 0)) $_FILES = $_POST = array();
}
Comments