[hotfix] add csrf_token api endpoint

This commit is contained in:
Maxime Beauchemin 2017-04-10 12:10:27 -07:00
parent 66bff01b45
commit 50a9e13f9b

View File

@ -1400,6 +1400,15 @@ class Superset(BaseSupersetView):
return json_success(
json.dumps(payload, default=utils.json_int_dttm_ser))
@api
@has_access_api
@expose("/csrf_token/", methods=['GET'])
def csrf_token(self):
return Response(
self.render_template('superset/csrf_token.json'),
mimetype='text/json',
)
@api
@has_access_api
@expose("/fave_dashboards/<user_id>/", methods=['GET'])