This commit is contained in:
yumoqing 2024-02-20 18:04:58 +08:00
parent 9ad801e8fe
commit 6b174dbf95

View File

@ -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)