From 3270f2bfd681ec4c1b5769134a261b63e8d21875 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 19 Feb 2025 12:46:44 +0800 Subject: [PATCH] bugfix --- ahserver/proxyProcessor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ahserver/proxyProcessor.py b/ahserver/proxyProcessor.py index c279418..2e7dd26 100644 --- a/ahserver/proxyProcessor.py +++ b/ahserver/proxyProcessor.py @@ -28,12 +28,18 @@ class ProxyProcessor(BaseProcessor): auth = None if d.get('user') and d.get('password'): auth = BasicAuth(d['user'], d['password']) + if g.get('headers'): + regH.update(d['headers']) + params = None + if d.get('params'): + params = params async with client.request( - request.method, + d.get('method', request.method), d['url'], auth=auth, headers = reqH, allow_redirects=False, + params=paams, data=await request.read()) as res: headers = res.headers.copy() # body = await res.read()