summaryrefslogtreecommitdiff
path: root/app/controllers/api/api_controller.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-09 20:40:06 -0700
committermo khan <mo@mokhan.ca>2015-02-09 20:40:06 -0700
commit2b679683b19322a568225a69949e5d8ed61fe9a9 (patch)
treec429152b92c4af7276b2c4e4daaf8be2fad4137e /app/controllers/api/api_controller.rb
parent41c8858025eb14cab34635b058ccf761dd04eb90 (diff)
protect from forgery and cache ip and hostname on fake agent.
Diffstat (limited to 'app/controllers/api/api_controller.rb')
-rw-r--r--app/controllers/api/api_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/api/api_controller.rb b/app/controllers/api/api_controller.rb
index 0316222..6954700 100644
--- a/app/controllers/api/api_controller.rb
+++ b/app/controllers/api/api_controller.rb
@@ -1,5 +1,10 @@
module Api
- class ApiController < ApplicationController
+ class ApiController < ActionController::Base
protect_from_forgery with: :null_session
+ protected
+
+ def publish(message)
+ Publisher.publish(message)
+ end
end
end