From 2535e22151bd9621397e5b4a5be9962e86fec379 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Fri, 12 Dec 2014 07:59:33 +1100
Subject: [PATCH] stop logging csrf errors for API

---
 config/initializers/logster.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/config/initializers/logster.rb b/config/initializers/logster.rb
index 652bac1ab..d280a18f6 100644
--- a/config/initializers/logster.rb
+++ b/config/initializers/logster.rb
@@ -8,7 +8,10 @@ if Rails.env.production?
     /^ActionController::UnknownFormat/,
 
     # suppress trackback spam bots
-    Logster::IgnorePattern.new("Can't verify CSRF token authenticity", { REQUEST_URI: /\/trackback\/$/ })
+    Logster::IgnorePattern.new("Can't verify CSRF token authenticity", { REQUEST_URI: /\/trackback\/$/ }),
+
+    # API calls, TODO fix this in rails
+    Logster::IgnorePattern.new("Can't verify CSRF token authenticity", { REQUEST_URI: /api_key/ })
   ]
 end