fix(web exec) Web execute command log didn't get the real ip if behind the lb proxy.

fixed
pull/189/head
ibuler 9 years ago
parent 609bba569e
commit cda0b9c90a

@ -233,7 +233,7 @@ class ExecHandler(tornado.websocket.WebSocketHandler):
def open(self):
logger.debug('Websocket: Open exec request')
role_name = self.get_argument('role', 'sb')
self.term.remote_ip = self.request.headers.get("X-Real-IP")
self.remote_ip = self.request.headers.get("X-Real-IP")
if not self.remote_ip:
self.remote_ip = self.request.remote_ip
logger.debug('Web执行命令: 请求系统用户 %s' % role_name)

Loading…
Cancel
Save