返回列表 发帖

[软件故障] DZ反代后发帖等时提示“您的请求来路不正确,无法提交。”的解决方法

现象:DZ反向代理后,发帖及回帖等时提示:
您的请求来路不正确,无法提交。

解决:include\global.func.php的函数submitcheck()中:
                if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && $GLOBALS['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) ||
                        preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST']))))

修改为:
        if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && $GLOBALS['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) ||
                        preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST']) ||
'www.abc.com' == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])
)))

其中,www.abc.com是被代理服务器的真实域名。
欢迎光临:逐梦论坛

返回列表

Powered by Discuz! 7.2   论坛QQ群:逐梦论坛群

© 2001-2021 Comsenz Inc. 鲁公网安备 37120302000001号