cic-internal-integration/apps/cic-eth/cic_eth/server/uwsgi.py
2021-12-02 15:07:49 +03:00

19 lines
401 B
Python

# standard imports
import json
DEFAULT_HEADERS = [
('Access-Control-Allow-Origin', '*'),
('Content-Type', 'application/json'),
]
def respond(start_response, data):
json_data = json.dumps(data)
content = json_data.encode('utf-8')
headers = [
*DEFAULT_HEADERS,
('Content-Type', 'application/json',)
]
start_response('200 OK', headers)
return [content]