From 6e6688bd3dc42d45542343dc2bee789cb30efb4d Mon Sep 17 00:00:00 2001 From: Qi Gao Date: Fri, 23 Nov 2018 14:07:45 +0800 Subject: [PATCH] Change the method to access client address (#10) * change get deviceip method * add version --- lyrebird_api_coverage/proxy/proxy_handler.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lyrebird_api_coverage/proxy/proxy_handler.py b/lyrebird_api_coverage/proxy/proxy_handler.py index e3f9576..5a802af 100644 --- a/lyrebird_api_coverage/proxy/proxy_handler.py +++ b/lyrebird_api_coverage/proxy/proxy_handler.py @@ -32,7 +32,7 @@ def handle(self, handler_context: HandlerContext): path = format_url.format_api(short_url).lower() # 获取handler_context.id,为前端展开看详情准备 path_id = handler_context.id - device_ip = handler_context.request.headers.get('lyrebird.device.ip') + device_ip = handler_context.client_address # 当请求过来的时候,base还没有init,需要进行init处理 if not app_context.base_list: diff --git a/setup.py b/setup.py index 6ef6976..307580d 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='lyrebird-api-coverage', - version='0.2.5', + version='0.2.6', packages=['lyrebird_api_coverage'], url='https://github.com/meituan/lyrebird-api-coverage', author='HBQA',