From 318a053dbff8fff07486ddf4212ad29b8986864e Mon Sep 17 00:00:00 2001 From: liuzheng712 Date: Fri, 26 Feb 2016 10:38:04 +0800 Subject: [PATCH] real ip --- run_websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_websocket.py b/run_websocket.py index 7030d2fc0..ddd724697 100755 --- a/run_websocket.py +++ b/run_websocket.py @@ -316,7 +316,7 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler): login_role.name)) self.term = WebTty(self.user, asset, login_role, login_type='web') # self.term.remote_ip = self.request.remote_ip - self.term.remote_ip = self.request.headers.get("X-Real_IP") + self.term.remote_ip = self.request.headers.get("X-Real-IP") self.ssh = self.term.get_connection() self.channel = self.ssh.invoke_shell(term='xterm') WebTerminalHandler.tasks.append(MyThread(target=self.forward_outbound))