Commits

Peter Ward committed c80fb17

Made compatible with Flask>0.1.

Comments (0)

Files changed (1)

     @app.before_request
     def _csrf_check_exemptions():
         try:
-            dest = app.view_functions[app.match_request()[0]]
+            dest = app.view_functions.get(request.endpoint)
             g._csrf_exempt = dest in _exempt_views
         except NotFound:
             g._csrf_exempt = False