Skip to content

Commit

Permalink
[hotfix] add csrf_token api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 10, 2017
1 parent 66bff01 commit 50a9e13
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,15 @@ def recent_activity(self, user_id):
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'])
Expand Down

0 comments on commit 50a9e13

Please sign in to comment.