gitlab-org--gitlab-foss/lib/omni_auth/request_forgery_protection.rb

22 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