# HG changeset patch # User Dennis Fink # Date 2015-10-22 23:03:20 # Node ID 942e4eb9227ffccf402ede1641b8a982c99f94e6 # Parent ce8015bd22cd38c044bfd74c2906fcb1ef020b49 Fix api update from csrf protection For now we simply exempt the protection diff --git a/ennstatus/api/views.py b/ennstatus/api/views.py --- a/ennstatus/api/views.py +++ b/ennstatus/api/views.py @@ -12,6 +12,7 @@ import strict_rfc3339 import pygeoip import requests +from ennstatus import csrf from ennstatus.status.functions import (single_server, all_servers, all_servers_by_type) from .model import Server @@ -22,6 +23,7 @@ gi4 = pygeoip.GeoIP('/usr/share/GeoIP/Ge gi6 = pygeoip.GeoIP('/usr/share/GeoIP/GeoIPv6.dat', pygeoip.MEMORY_CACHE) +@csrf.exempt @api_page.route('/update', methods=('POST',)) @httpauth.login_required def update():