FIX: Allow requests with API keys (#52)

FIX: Allow requests with API keys (#52)

diff --git a/app/controllers/docker_manager/application_controller.rb b/app/controllers/docker_manager/application_controller.rb
index c6780ec..ebb9d73 100644
--- a/app/controllers/docker_manager/application_controller.rb
+++ b/app/controllers/docker_manager/application_controller.rb
@@ -7,9 +7,11 @@ module DockerManager
     protect_from_forgery
 
     def handle_unverified_request
-      super
-      clear_current_user
-      render plain: "['BAD CSRF']", status: 403
+      unless is_api?
+        super
+        clear_current_user
+        render plain: "['BAD CSRF']", status: 403
+      end
     end
 
   end

GitHub sha: 3fedba4a