debian-mirror-gitlab/lib/omni_auth/request_forgery_protection.rb
2015-12-23 02:04:40 +05:30

21 lines
370 B
Ruby

# Protects OmniAuth request phase against CSRF.
module OmniAuth
module RequestForgeryProtection
class Controller < ActionController::Base
protect_from_forgery with: :exception
def index
head :ok
end
end
def self.app
@app ||= Controller.action(:index)
end
def self.call(env)
app.call(env)
end
end
end