Skip to content

Commit 7cb16ed

Browse files
committed
Return proper content type for data and meta endpoints
1 parent 4f9478e commit 7cb16ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tscached/handler_general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ def handle_query():
7373
elif cache_mode != overall_cache_mode:
7474
overall_cache_mode = 'mixed'
7575

76-
return json.dumps(ret_data), 200, {'X-tscached-mode': overall_cache_mode}
76+
return json.dumps(ret_data), 200, {'Content-Type': 'application/json', 'X-tscached-mode': overall_cache_mode}

tscached/handler_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def metadata_caching(config, name, endpoint, post_data=None):
7373
# Eat the Redis exception - turns these endpoints into straight proxies.
7474
logging.error('RedisError: ' + e.message)
7575

76-
return kairos_result.text, kairos_result.status_code
76+
return kairos_result.text, kairos_result.status_code, {'Content-Type': 'application/json'}
7777

7878

7979
@app.route('/api/v1/metricnames', methods=['GET'])

0 commit comments

Comments
 (0)