From 6b174dbf95eba9cf1b978a6badca0b8c168b1aed Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 20 Feb 2024 18:04:58 +0800 Subject: [PATCH] bugfix --- ahserver/baseProcessor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index 8b811af..c86b57d 100755 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -102,6 +102,11 @@ class BaseProcessor(AppLogger): elif type(self.content) == type([]): self.content = json.dumps(self.content, indent=4) jsonflg = True + elif type(self.content) == type(b''): + self.headers['Access-Control-Expose-Headers'] = 'Set-Cookie' + resp = Response(body=self.content,headers=self.headers) + self.set_response_headers(resp) + return resp else: try: json.loads(self.content)