Set correct header when returning json.