Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
Created February 26, 2020 22:39
Show Gist options
  • Save wshihadeh/26a799f171c8e5ec30ee0368d9a5d179 to your computer and use it in GitHub Desktop.
Save wshihadeh/26a799f171c8e5ec30ee0368d9a5d179 to your computer and use it in GitHub Desktop.
Application Controller
def append_info_to_payload(payload)
super
payload[:host] = request.host
payload[:remote_ip] = request.remote_ip
payload[:ip] = request.ip
payload[:x_forwarded_for] = request.env['HTTP_X_FORWARDED_FOR']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment