Sha256: 7afb9aa871c3a20977f42c35685bb5ff845267f0d7c008a17dc7414b9d727906
Contents?: true
Size: 631 Bytes
Versions: 4
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true module Keycard::Request # This class should be used to extract attributes when the application will # serve HTTP requests directly or through a proxy that passes trusted # values into the application environment to be accessed as usual. class DirectAttributes < Attributes def base { user_pid: user_pid, user_eid: user_eid, client_ip: client_ip } end def user_pid request.env['REMOTE_USER'] end def user_eid user_pid end def client_ip (request.env['REMOTE_ADDR'] || '').split(',').first end end end
Version data entries
4 entries across 4 versions & 1 rubygems