betodealmeida commented on a change in pull request #14675:
URL: https://github.com/apache/superset/pull/14675#discussion_r633947804
##########
File path: superset/views/base.py
##########
@@ -361,6 +371,13 @@ def show_superset_errors(ex: SupersetErrorsException) ->
FlaskResponse:
return json_errors_response(errors=ex.errors, status=ex.status)
+# Redirect to login if the CSRF token is expired
+@superset_app.errorhandler(CSRFError)
+def refresh_csrf_token(ex: CSRFError) -> FlaskResponse:
+ logger.warning(ex)
+ return redirect(appbuilder.get_url_for_login)
Review comment:
Will do, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]