gitlab-org--gitlab-foss/lib/omni_auth/request_forgery_protection.rb
2015-12-08 14:58:15 +01:00

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