-----------后端------------ use Workerman\Worker; use PHPSocketIO\SocketIO; require_once __DIR__ . '/../Workman/vendor/autoload.php'; $io = new SocketIO(7728); $io->on('connection', function($socket)use($io){ ...
我用nginx代理到gateway的,$_SERVER['REMOTE_ADDR'] 获取到的是127.0.0.1 不是客户端的ip, nginx配置如下: location /GatewayWorker { proxy_pass http://127.0.0.1:8282; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_s...